+ Reply to Thread
Results 1 to 19 of 19

Lookup with multiple returns for blocks of unique Identifiers.

  1. #1
    Registered User
    Join Date
    06-11-2013
    Location
    Indiana, PA
    MS-Off Ver
    MS365 Version 2209
    Posts
    29

    Lookup with multiple returns for blocks of unique Identifiers.

    Hello,

    I am looking for a way, I've been kicking around INDEX MATCH, to create a formula that will accomplish what I have in Column P (manually)

    The Order ID and Invoice Number are identical, however, they are not unique. I know index match can do this, frozen to a lookup value, but is there a way to make it dynamic so that I can drag the formula in P?

    Vlookup, of course returns the first found value relating to the lookup value in all instances in column N but they need to change based on the 2nd, 3rd, 4th ect....instances of the same ID. I do not have the data in Column E on the dataset in L:P. If I did, a simple VLOOKUP would do the trick.

    I attached a JPEG and a sample of the dataset in the same format. The actual workbook is probably better as it contains more examples of multiple different items under one Order ID/InvoiceNumber.

    The whole dataset is so large, it will take a week to do it manually.

    Thank you for your help!




    MultipleReturns.jpg
    Attached Files Attached Files
    Last edited by billbalint; 10-20-2022 at 01:26 AM.

  2. #2
    Registered User
    Join Date
    06-11-2013
    Location
    Indiana, PA
    MS-Off Ver
    MS365 Version 2209
    Posts
    29

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    The actual dataset, is so large, that is. This is a sample to accomplish the same thing.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,218

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    Administrative Note:

    Is you forum profile showing the version of Excel that you need this to work for?

    Members will tailor the solutions they offer to the version of Office (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this.

    The three most recent versions of Excel are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the release number in your profile (e.g. MS365 Version 2211). This is in the About Excel section further down the Account page.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    One way:
    =IFERROR(INDEX(G:G,AGGREGATE(15,6,ROW($G$2:$G$36)/(($D$2:$D$36=M2)*($G$2:$G$36<>"")),COUNTIF(M$2:M2,M2))),"")

    copied down. If you have )365, there MAY be a better way.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Registered User
    Join Date
    06-11-2013
    Location
    Indiana, PA
    MS-Off Ver
    MS365 Version 2209
    Posts
    29

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    I do have Office 365
    Last edited by billbalint; 10-20-2022 at 09:09 AM.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    OK.

    1. Please amend your profile to show O365 and the version number (model it on mine)

    2. Check the solution that I have already offered. Does it deliver the required results?

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    looking at this again, I'm not sure if a dynamic array would offer any obvious advantage over what you've been given already (assuming it does what you want it to do!!).

    So, over to you. Does my previous offering work, or not? If not, where? What should it give, and why?

  8. #8
    Registered User
    Join Date
    06-11-2013
    Location
    Indiana, PA
    MS-Off Ver
    MS365 Version 2209
    Posts
    29

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    I neglected to note that each data point pulled over needs to be on the "InvoiceLines" Row on the new dataset.

    I'm honestly hopeful that it's even possible. Somewhere in this project, the SKUs got completely scrambled and there is no matching dataset with old SKUs to do a simple lookup. What a mess!

    It also, needs to leave a blank if there is no SKU, like in the instance that I've highlighted red.
    Attached Files Attached Files
    Last edited by billbalint; 10-20-2022 at 09:36 AM.

  9. #9
    Registered User
    Join Date
    06-11-2013
    Location
    Indiana, PA
    MS-Off Ver
    MS365 Version 2209
    Posts
    29

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    AliGW, If you see what I've just Attached to Glenn, I am using MS365 V2209 Build 15629.20208. Updated my profile to show.
    Last edited by billbalint; 10-20-2022 at 09:38 AM.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    Try:
    =IF(K2="InvoiceLines",INDEX(F:F,AGGREGATE(15,6,ROW($F$2:$F$36)/(($D$2:$D$36=L2)*($F$2:$F$36<>"")),COUNTIFS(K$2:K2,"InvoiceLines",L$2:L2,L2))),"")
    Attached Files Attached Files

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    I just noticed the bit about the red shading.

    Ryan Floss has 7 entries on the left. One blank and 6 values.

    On the right he has 6 ILs. You want 1 blank and 5 values returned.

    BUT in the case of Ryan Pervola, 2 on the left... one blank and one value. HOWEVER, you want the value, not the blank returned.

    EXPLAIN the logic and DEFINE the rule that governs this....

  12. #12
    Registered User
    Join Date
    06-11-2013
    Location
    Indiana, PA
    MS-Off Ver
    MS365 Version 2209
    Posts
    29

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    My computer is choking but this looks to be working! You are the man, Glenn!

    I've been getting a lot of Calculating (8 Threads):0% issues. I copied and pasted values after adjusting and copying the formula down to 165600 and it's at 57% after 5 minutes.

    Any suggestions to help this error? I know there is something about cleaning the cache. I haven't used this computer or this version of excel very much, it's 5 months old.

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    Did you see post 11? Does that cause issues??

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    Is this any faster (assuming Post 11 isn't a problem)?
    Attached Files Attached Files

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    or this???
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    06-11-2013
    Location
    Indiana, PA
    MS-Off Ver
    MS365 Version 2209
    Posts
    29

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    Your initial IF="InvoiceLines" worked perfectly!

    Thank you, Glenn. Can I add you as a friend? I have one of these really buggery ones once in a while, hence my short history on the forum. I really appreciate it. You saved me a huge headache!

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    Sure thing. I'm not sure what difference being a friend makes to either of us, but....

    You're welcome & glad it worked.

  18. #18
    Registered User
    Join Date
    06-11-2013
    Location
    Indiana, PA
    MS-Off Ver
    MS365 Version 2209
    Posts
    29

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    So I can remember you in case it is two years until I have an issue that I can't troubleshoot and figure. Thanks agian!

  19. #19
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lookup with multiple returns for blocks of unique Identifiers.

    LoL. That makes sense!!

+ 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. Replies: 11
    Last Post: 04-11-2015, 05:48 PM
  2. [SOLVED] Compare multiple rows with unique identifiers to return action
    By Scoobing in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-30-2014, 05:03 PM
  3. Replies: 7
    Last Post: 06-27-2014, 02:26 AM
  4. Lookup formula that returns unique multiple search results
    By wit2001large in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-23-2013, 08:09 AM
  5. Lookup formula that returns unique multiple search results WITH ATTACHMENT
    By wit2001large in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-23-2013, 06:02 AM
  6. Identifying unique days in excel, with multiple identifiers
    By PosiJoel in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-17-2012, 06:33 PM
  7. Running a loop with multiple Unique identifiers from OE DB connection
    By pmothers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-24-2012, 06:05 PM

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