+ Reply to Thread
Results 1 to 12 of 12

Help required with INDEX and multiple MATCH function - Excel 2007

  1. #1
    Registered User
    Join Date
    01-03-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Help required with INDEX and multiple MATCH function - Excel 2007

    Hi

    I've attached an example spreadsheet for what I'm looking to achieve. I'm attempting to create a formula that will look up the block, row and seat data found on the database tab and match these 3 cells data with the block, row and seat data on the area tabs. If the 3 cells data matches the 3 cells on the data tab, I would like the client name from the database tab to display in the client column in the data tabs.

    I think I should be using the INDEX and MATCH functions, but I'm having real problems making them work after brief success early on, I cannot get the cells displaying anything other than errors. Can anyone help?

    Thanks
    Ben
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Help required with INDEX and multiple MATCH function - Excel 2007

    In D2 and copy down, this ARRAY(confirm using control+shift+enter-NOT just Enter) formula.

    Please Login or Register  to view this content.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

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

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Help required with INDEX and multiple MATCH function - Excel 2007

    Hi saundersben and welcome to the forum

    i would do this with a helper column on your data sheet. in E2, copied down, use this...
    =A2&B2&C2
    then on both area sheets, use this in D2, copied down...
    =IFERROR(INDEX(Database!$D$2:$E$11,MATCH(A2&B2&C2,Database!$E$2:$E$11,0),1),"Not Found")

    let me know how you make out
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Help required with INDEX and multiple MATCH function - Excel 2007

    Nice job, Fotis and FD... I should start using the '&' more with these types of formulas... call me old fashioned I guess... I used an array formula similar to Fotis' suggestion:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    - Moo

  5. #5
    Registered User
    Join Date
    01-03-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Help required with INDEX and multiple MATCH function - Excel 2007

    hi all

    Thanks for your help. I think I was there or there abouts, but perhaps was having issues with the Ctrl + Shift + Enter to make the formula work. What's the reasoning behind this and why does it return an error if you just hit Enter?

    Thanks!
    Ben

  6. #6
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Help required with INDEX and multiple MATCH function - Excel 2007

    Here's a better explanation than I can give:

    http://www.cpearson.com/excel/ArrayFormulas.aspx

    - Moo

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Help required with INDEX and multiple MATCH function - Excel 2007

    You are welcome.

    See here an interesting article for Arrays Formulas.

    http://www.cpearson.com/excel/arrayformulas.aspx

    @ Moo

    Thanks for your kind comment.

  8. #8
    Registered User
    Join Date
    01-03-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Help required with INDEX and multiple MATCH function - Excel 2007

    Thanks I'll have a read through. One last question, I promise, how would I make Fotis' formula return a blank cell instead of an error should the formula return false, i.e. if the 3 cells cannot be matched on the database?

  9. #9
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Help required with INDEX and multiple MATCH function - Excel 2007

    To return blank instead of an error (when there is no match of all 3 columns) with Fotis' formula, try this:

    =IFERROR(INDEX(Database!$D$2:$D$11,MATCH(A2&B2&C2,Database!$A$2:$A$11&Database!$B$2:$B$11&Database!$C$2:$C$11,0)),"")

    Again, entered with Ctrl + Shift + Enter

    - Moo
    Last edited by Moo the Dog; 01-03-2013 at 12:41 PM.

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Help required with INDEX and multiple MATCH function - Excel 2007

    Quote Originally Posted by saundersben50 View Post
    Thanks I'll have a read through. One last question, I promise, how would I make Fotis' formula return a blank cell instead of an error should the formula return false, i.e. if the 3 cells cannot be matched on the database?
    Feel free to ask any question.

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Help required with INDEX and multiple MATCH function - Excel 2007

    thanks for the thanks Moo, i need to use arrays more too lol. call me old fashioned, but i still like my helper columns

  12. #12
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Help required with INDEX and multiple MATCH function - Excel 2007

    I am fun of the helper columns but unfortunnately the majority of people don't like these!

    http://www.excelforum.com/the-water-...r-columns.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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