+ Reply to Thread
Results 1 to 12 of 12

Look up multiple matches in list and return multiple values

  1. #1
    Registered User
    Join Date
    11-13-2022
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 365
    Posts
    6

    Look up multiple matches in list and return multiple values

    Hi,

    I have a sheet with a source dataset in a table, with columns POSTCODE and LGA (Local Government Area).

    On a second sheet I want to enter a list of LGAs in column A. I'd then like all rows matching those LGAs to populate in columns B and C (POSTCODE and LGA), with no blank rows.

    There will be multiple rows with the same POSTCODE and LGA, as the unique data point in the source data is LOCALITY (unused), so I may need to manually remove duplicate rows based on POSTCODE, but I'd love if this could be done automatically.

    Attachments
    Screenshot 1 is an excerpt of the source dataset
    Screenshot 2 is a manually created example of the desired output (Manually input to column A, return info in columns B and C)
    Screenshot 3 is the same as 2 but with the duplicated entries removed - Ultimately desired outcome.

    Really grateful for any advice that can be given! Thanks!
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,072

    Re: Look up multiple matches in list and return multiple values

    Easiest way to do this is by using PivotTable with filter/slicer.

  3. #3
    Registered User
    Join Date
    11-13-2022
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Look up multiple matches in list and return multiple values

    Thanks for your response Joseph. I'm not experienced with Pivot tables - Could you give me some step-by-step instructions?

  4. #4
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,072

    Re: Look up multiple matches in list and return multiple values

    Please attach sample workbook. Read instructions on how to attach workbook on the yellow panel at the top.

  5. #5
    Registered User
    Join Date
    11-13-2022
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Look up multiple matches in list and return multiple values

    Sample workbook attached
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,072

    Re: Look up multiple matches in list and return multiple values

    Attached file with Postcode and LGA Region in Rows area of PivotTable and LGA Region in Slicer.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-13-2022
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Look up multiple matches in list and return multiple values

    Thank you, this seems to work very well, except that I appear to need to manually select the LGAs. This is essentially what I was doing previously - Filtering a table by manually selected LGAs (and also manually removing duplicates - So pleased to see this does so automatically!). I would however like the filter to use a copied list.

    Also, the dataset in the example is only an excerpt for the purposes of sharing here. I've tried to add some of the omitted rows to test, and the table has automatically expanded, but the slicer does not include the other options. Can you advise how to update your example with the full dataset of 18407 rows?

    Thanks again for your help!

  8. #8
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,072

    Re: Look up multiple matches in list and return multiple values

    You need to right-mouse-click and refresh the PivotTable, whenever new data is added.

  9. #9
    Registered User
    Join Date
    11-13-2022
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Look up multiple matches in list and return multiple values

    Thank you, that has worked.

    And regarding the need to manually select LGAs, rather than entering a list of LGA names and the pivot table using that to filter?

  10. #10
    Registered User
    Join Date
    11-13-2022
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Look up multiple matches in list and return multiple values

    Hi, still looking to a solution to the above so I can mark as Solved. Thank you

  11. #11
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,072

    Re: Look up multiple matches in list and return multiple values

    Can't do with PivotTable. Sorry, I can't think of a formula. Hopefully some experts can come in to help.

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,670

    Re: Look up multiple matches in list and return multiple values

    Perhaps this method will do what you want.
    1. Add another column to the table populated using: =AND(COUNTIFS(List,[@[LGA Region]])>0,COUNTIFS(B$2:B2,B2,AD$2:AD2,AD2)=1)
    2. Produce a named range (List) with a refers to of: =OFFSET(Processing!$A$2,0,0,COUNTIFS(Processing!$A$2:$A$500,"*"),1)
    Note that you can modify AP500 so that it will accommodate the largest possible number of LGA's which might be selected.
    3. Paste the list of LGA's into cells A2 and down on the Processing sheet
    4. Populate column B on the Processing sheet using: =IFERROR(INDEX(Table1[Postcode],AGGREGATE(15,6,(ROW(Table1[Postcode])-ROW(Table1[#Headers]))/(Table1[Filter]),ROWS(B$2:B2))),"")
    5. Populate column C using: =IF(B2="","",INDEX(Table1[LGA Region],AGGREGATE(15,6,(ROW(Table1[Postcode])-ROW(Table1[#Headers]))/(Table1[Filter]),ROWS(B$2:B2))))
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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: 5
    Last Post: 03-24-2021, 06:35 PM
  2. Replies: 1
    Last Post: 03-19-2021, 01:32 AM
  3. [SOLVED] Formula to return multiple matches from a reference list
    By stardust_magic in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 01-17-2021, 01:24 AM
  4. [SOLVED] Return multiple values in a list based on multiple criteria
    By yuvalmoshe in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-13-2020, 09:54 AM
  5. [SOLVED] Lookup Values which meet two or more criteria and return multiple matches horizontally
    By josetmg in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-03-2015, 01:16 AM
  6. Replies: 2
    Last Post: 03-03-2014, 10:03 PM
  7. [SOLVED] Finding Matches With Multiple Return Values
    By ajulian in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-27-2013, 11:20 AM

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