+ Reply to Thread
Results 1 to 8 of 8

Vlookup with multiple matches returns blank

  1. #1
    Registered User
    Join Date
    12-11-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel Pro Plus 2019
    Posts
    67

    Vlookup with multiple matches returns blank

    I have two sheets, (Sheet 1) Transactions, which is like a cash register and (Sheet 2) Members, which holds a list of all members, and in the last column we need to indicate if dues are paid for 2013 by looking up in Transactions.

    Transactions
    A- B- C- D- E- F- G- H- I- J- K- L- M- N
    Date- Receipt#- Check#- Method- RecID- First- Last- Membership Year- TeamNo- TeamCoach- Notes- TotalPaid- DepositDate- Services
    4/9/2013- x- x- x- 17252- Kristopher- Bold- x- x- x- $20- x- Uniform
    4/12/2013- x- x- x- 17252- Kristopher- Bold- 2013- x- x- x- $150- x- Dues
    4/12/2013- x- x- x- 17249- Nicholas- Bold- 2013- x- x- x- $150- x- Dues


    Members
    A- B- C- D- E- F
    1- SerialNo- First Name- Last Name- Zip- Phone- Dues Paid
    2- 17249- Nicholas- Bold- - 2013-
    3- 17252- Kristopher- Bold- - - Result should be 2013 not blank in F3


    Formula in Members!F2:F3)
    =IF(ISTEXT(VLOOKUP(A2,Transactions!E$2:N$2881,10,FALSE)),IF(AND(VLOOKUP(A2,Transactions!E$2:N2881,10,FALSE)="Dues",VLOOKUP(A2,Transactions!E$2:N2881,4,FALSE)=YEAR(TODAY())),VLOOKUP(A2,Transactions!E$2:N2881,4,FALSE),""),"")

    Above formula works fine if member's first transaction under services is "Dues". However if first transaction is anything other than "Dues", it does not return "2013", which is what I am looking for.

    Any help is appreciated.

  2. #2
    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,917

    Re: Vlookup with multiple matches returns blank

    Hi

    Its almost impossible to make out which values are in which columns, I would suggest you upload a sample workbook, showing what you have, what you want, and how you got thatTo attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

  3. #3
    Registered User
    Join Date
    12-11-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel Pro Plus 2019
    Posts
    67

    Re: Vlookup with multiple matches returns blank

    Thanks for your help. I did try to upload the file when posting originally, but missed the "manage attachments", so here it is.
    Attached Files Attached Files

  4. #4
    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,917

    Re: Vlookup with multiple matches returns blank

    Thanks for the file

    try this...

    add a helper column to sheet1, column O, and copy this down - you can put it where you want, just change the references, you can also hide it...
    =E2&N2

    Then in sheet2, under dues paid, use this, copied down...

    =IFERROR(INDEX(Transactions!$H$2:$H$4,MATCH(Members!A2&"Dues",Transactions!$O$2:$O$4,0),1),"")

  5. #5
    Registered User
    Join Date
    12-11-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel Pro Plus 2019
    Posts
    67

    Re: Vlookup with multiple matches returns blank

    Very neat work around, thank you, I will use it. Just for my own knowledge, is there a way to do it in one formula, something like the Nth-Vlookup?

  6. #6
    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,917

    Re: Vlookup with multiple matches returns blank

    you could use an array formula....

    =IFERROR(INDEX(Transactions!$H$2:$H$4,MATCH(Members!A2&"Dues",Transactions!$E$2:$E$4&Transactions!$N$2:$N$4,0),1),"")

    entered using CTRL SHIFT enter, not just enter

  7. #7
    Registered User
    Join Date
    12-11-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel Pro Plus 2019
    Posts
    67

    Thumbs up Re: Vlookup with multiple matches returns blank

    Thank you, I will try it as soon as I get some time to do so.
    How do I indicate that the problem has been solved?

  8. #8
    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,917

    Re: Vlookup with multiple matches returns blank

    see my footnotes at the bottom of my post...

    If your question is resolved, mark it SOLVED using the thread tools

+ 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