+ Reply to Thread
Results 1 to 5 of 5

Match entries in multiple columns

  1. #1
    Registered User
    Join Date
    08-31-2009
    Location
    Cardiff
    MS-Off Ver
    Excel 2007
    Posts
    13

    Unhappy Match entries in multiple columns

    Hi all,

    Please see the attached, I have tried (unsucessfully) to cross match three columns B,E & G to see if the entry in B is in the other two and to give a answer in column C. But I can't seem to get it right, can anyone please help a weary old so and so.

    Cheers
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208

    Re: Match entries in multiple columns

    I can't see the workbook (Excel 2003 at work w/o the 2007 conversion ), but see if this will work for you (gives TRUE/FALSE response):

    =AND(COUNTIF(E:E,B1)>0,COUNTIF(G:G,B1)>0)

    HTH,
    Jason

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Match entries in multiple columns

    I like your formula... but when both match, you always get 2...

    Try amending to:

    =LOOKUP(IF(ISNUMBER(MATCH($B3,$E$3:$E$21,0)),1,0)+IF((ISNUMBER(MATCH($B3,$G$3:$G$76,0))),2,0),{0,1,2,3},{"Not Found","RA NO","RA Yes","Both"})

    copied down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    08-31-2009
    Location
    Cardiff
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Match entries in multiple columns

    NBVC, Thanks very much, I need all of the hair I've got at my age.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Match entries in multiple columns

    I guessed that formula came from DonkeyOte or Daddylonglegs.. so I looked back at your previous posts...

    Although my rendition works too, I added an IF statement, but DonkeyOte avoided that, smartly, just by multiplying the second part of the lookup by 2...

    So all you forgot was the 2* on the second part...

    e.g. Should be

    =LOOKUP(ISNUMBER(MATCH($B3,$E$3:$E$21,0))+2*(ISNUMBER(MATCH($B3,$G$3:$G$76,0))),{0,1,2 ,3},{"Not Found","RA NO","RA Yes","Both"})

+ 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