+ Reply to Thread
Results 1 to 11 of 11

Match Index with multiple columns/searches?

  1. #1
    Registered User
    Join Date
    12-04-2008
    Location
    notta
    Posts
    21

    Match Index with multiple columns/searches?

    Sheet setup

    How do you use index with multiple columns

    if I do =INDEX(C2:C4,MATCH(INDEX(E6:E25,MATCH(B3,C6:C25,0)),B2:B4,0))


    Then it works.. I get the name that I need.

    but if I use

    =INDEX(C2:C4&I2:I4&K2:K4,MATCH(INDEX(E6:E25&O6:25,MATCH(B3,C6:C25&P6:P26,0)),B2:B4&H2:H4&J2:J4,0))

    So basically I have 2 columns with possible names. I need to search BOTH columns for the name and then look into the cell next to it to grab a NUMBER. Then Search 3 columns of names that will correspond ot that number and grab the name.

    When I try the & with other cells it doesn't work properly. Could someone explain how to use INDEX/Match with multiple colums each section of the formula and return just one result

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Match Index with multiple columns/searches?

    Can you upload an example spreadsheet (Go Advanced>Manage Attachments)? Show what you have, what you want to return.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    12-04-2008
    Location
    notta
    Posts
    21

    Re: Match Index with multiple columns/searches?

    ok here it is

    on Patient Data sheet I am trying to match the nurse with the patient name. In the end there will be 30 of these sheets and I need to use DCOUNTA to count the number of different nurses that had that patients. So I am trying to grab the name on each sheet.

    The index/match needs to search each column of patient name for the names and then needs to search each column number of the nurse to match the nurse.


    SO as you change the nurse # it will take it from above. I can get it work if I only use the ONE range, but having it search multiple ranges produces different results, sometimes TWO of the names above.

    thanks
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-04-2008
    Location
    notta
    Posts
    21

    Re: Match Index with multiple columns/searches?

    if I use VLOOKUP(B3,'Su-N'!C6:E25&'Su-N'!O6:Q25,3,FALSE) then I get the number corresponding to the nurse and it works for BOTH columns (using CTRL+SHIFT+ENTER).

    but If i combine it

    =VLOOKUP(VLOOKUP(B3,'Su-N'!C6:E25&'Su-N'!O6:Q25,3,FALSE),'Su-N'!B2:E4,2,FALSE)

    I get a value\na error, but if I remove the inside Vlookup and manually put 2 or 3, etc, it will look up the name?

    hmmm

  5. #5
    Registered User
    Join Date
    12-04-2008
    Location
    notta
    Posts
    21

    Re: Match Index with multiple columns/searches?

    so is what I am asking impossible with standard functions???

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Match Index with multiple columns/searches?

    Hi.

    Perhaps if you re-posted your workbook with some manually-calculated expected results added and highlighted then it would be clearer what you are trying to do.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  7. #7
    Registered User
    Join Date
    12-04-2008
    Location
    notta
    Posts
    21

    Re: Match Index with multiple columns/searches?

    OK here is an updated template. Since I was asked to show my final result I expanded a little more on what exactly is needed.


    on Patient Data Sheet there are names (used for Data List) to select what will be used on the main Sheets Su-N/Su-D/Su-E.

    I am trying to count the number of different caregivers (nurses) assigned to each patient for all the sheets (assignment sheets). Each person will count as one. I need to search BOTH columns of patient names and match up with both columns of Numbers. Then match it with the numbers in the 3 columns above and their nurses. Then count number of Different names to get a total number of caregivers assigned to that patient for all sheets.

    In the end there will be lots of sheets, but for now I just included SUNDAY.

    Thanks in advance.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    12-04-2008
    Location
    notta
    Posts
    21

    Re: Match Index with multiple columns/searches?

    I tried naming ranges and still didn't work. I really don't want to use VBA if at all possible.

  9. #9
    Registered User
    Join Date
    12-04-2008
    Location
    notta
    Posts
    21

    Re: Match Index with multiple columns/searches?

    well I still can't figure it out totally... I guess this one has stumped many others as well..

  10. #10
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Match Index with multiple columns/searches?

    Yes, I think counting unique references across multiple spreadsheets will require using VBA. Maybe you want to post in the Excel programming section.

  11. #11
    Registered User
    Join Date
    12-04-2008
    Location
    notta
    Posts
    21

    Re: Match Index with multiple columns/searches?

    what about just returning the ONE sheet result then? I can't seem to get it to work will all columns on the top with the nurses.. with the patients for some reason I can use this..

    {=INDEX('WK1-Su-N'!Q$6:Q$25&'WK1-Su-N'!E$6:E$25,MATCH(B3,'WK1-Su-N'!O$6:O$25&'WK1-Su-N'!C$6:C$25,0),1)}

    and it will return the number next to them with no issues. (so its searching BOTH colums and returning the correct result).

    But if I try to use Match to search multiple columns (3 columns) for the nurses it will give me NA error.. weird..

    If i can get it to find the patients name, get the assigned number next to it, then search the nurses #'s to get the name I think I can build another sheet to just list these, but I can't get all of that. I can get most, but not all.

    the last function weather to use INDEX or Match, or Vlookup only wants ONE range, won't accept multiple. If someone could fix that then that would be awesome..
    Last edited by ExcelNoob2008; 12-02-2014 at 12:57 PM.

+ 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] Generate List from Index Match that searches for a value in a field
    By markslaysman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-29-2014, 11:40 AM
  2. Help using multiple Match searches in an index
    By kmo0034 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-30-2014, 03:32 AM
  3. [SOLVED] 2 or more Index Match Searches in one?
    By nobodyukno in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-12-2013, 01:48 PM
  4. Index Match Across Multiple Columns
    By FFastZB in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-20-2013, 04:58 PM
  5. [SOLVED] Index/Match across multiple columns
    By BB1972 in forum Excel General
    Replies: 2
    Last Post: 07-27-2012, 12:05 PM

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