+ Reply to Thread
Results 1 to 5 of 5

Test if a cell value matches a value in two or more cells not in a list

  1. #1
    Registered User
    Join Date
    10-13-2022
    Location
    Northamptonshire, England
    MS-Off Ver
    Excel 2016
    Posts
    56

    Test if a cell value matches a value in two or more cells not in a list

    Can I simplify the following condition

    If Target.Address = "$E$7" Or Target.Address = "$E$9" Or Target.Address = "$H$7" Or Target.Address = "$H$9"

    In Visual Foxpro it would be

    If InList(Target.Address, "$E$7", "$E$9", "$H$7", "$H$9")

  2. #2
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    365 32bit Win
    Posts
    1,909

    Re: Test if a cell value matches a value in two or more cells not in a list

    There're a few ways.
    Probably the most similar to the Foxpro would be

    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,602

    Re: Test if a cell value matches a value in two or more cells not in a list

    Please Login or Register  to view this content.
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    10-13-2022
    Location
    Northamptonshire, England
    MS-Off Ver
    Excel 2016
    Posts
    56

    Re: Test if a cell value matches a value in two or more cells not in a list

    @ByteMarks
    That'll do, thank you very much.
    Last edited by Paul Newton; 12-29-2022 at 07:29 PM. Reason: Omitted adressee

  5. #5
    Registered User
    Join Date
    10-13-2022
    Location
    Northamptonshire, England
    MS-Off Ver
    Excel 2016
    Posts
    56

    Re: Test if a cell value matches a value in two or more cells not in a list

    @protonLeah
    I think I like that even better, so thank you too

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Bring a list of cells where column in 2nd Sheet matches a cell value in first sheet
    By sharonca in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-26-2022, 01:42 PM
  2. COUNTIFS if Cells Value Matches from a Named List?
    By i3 Data Hound in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-09-2021, 10:25 AM
  3. [SOLVED] Want to extract partial matches from a list and add to existing list of retreived matches
    By PeteABC123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-29-2019, 02:31 PM
  4. Replies: 1
    Last Post: 06-24-2019, 11:24 AM
  5. Replies: 2
    Last Post: 03-01-2019, 02:00 PM
  6. Replies: 3
    Last Post: 08-21-2013, 07:10 PM
  7. Replies: 2
    Last Post: 04-21-2010, 07:25 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1