+ Reply to Thread
Results 1 to 3 of 3

Match value in one cell with values in multiple columns

  1. #1
    Forum Contributor
    Join Date
    10-03-2005
    Posts
    185

    Match value in one cell with values in multiple columns

    I have first set of data which is my rules and it contains values in 4 columns and approximately 100 rows. Some cells are blank.

    I have second set of data in one column and approximately 50 rows. Now for this second set of data, I would like to compare value in each cell to all the values in first data to return a true or false based on if there is a match or not.

    Now I tried the following formula:
    =SUMPRODUCT(--('[file1.xls]Sheet1'!$C$2:$F$55=LEFT(B6,8)))

    This works just fine and returns 0 or 1 until there multiple matches and I get numbers like 5 or 7. I would like to get a 0 or 1 back as soon as there is one or more match. I prefer not to change my first data set to put all my unique values in one column because that data set changes frequently and I get a download plus if anyone needs to verify that those "rules" are correct then it can not be done in one column of data.

    Any thoughts?

    Thank you in advance,
    Jay
    Last edited by sa02000; 10-08-2010 at 05:13 AM. Reason: Marked as solved

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Match value in one cell with values in multiple columns

    You only really need to use SUMPRODUCT if [file1.xls] is going to be closed when this function calculates else use COUNTIF.

    Irrespective of which approach you use encase the result within a SIGN call

    Please Login or Register  to view this content.
    All positive values will return 1 and 0 will return 0

  3. #3
    Forum Contributor
    Join Date
    10-03-2005
    Posts
    185

    Re: Match value in one cell with values in multiple columns

    sign is exactly what I needed. Thank you very much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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