+ Reply to Thread
Results 1 to 7 of 7

return multiple items from one lookup

  1. #1
    Registered User
    Join Date
    04-23-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    50

    return multiple items from one lookup

    Hello All,

    Having trouble with my formula for returning multiple items from a table based on a criteria. Please see attached sample. any help is appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: return multiple items from one lookup

    Try

    In E5
    =IF(ROWS($A$1:$A1)>COUNTIF(Table1[Region],$D$3),"",INDEX(Table1[City],SMALL(INDEX((Table1[Region]=$D$3)*(ROW(Table1[Region])-ROW($L$5)+1),),COUNTIF(Table1[Region],"<>"&$D$3)+ROWS($A$1:$A1))))

    In F5
    =IF(E5="","",INDEX(Table1[Budget],MATCH(E5,Table1[City],0)))

    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    04-23-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: return multiple items from one lookup

    Genius; thank you Ace!

  4. #4
    Registered User
    Join Date
    04-23-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: return multiple items from one lookup

    Hi Ace,

    You were kind enough to help me out with the above formula a couple of weeks ago. I need your assistance expanding the formula to add one additional criteria - year. The year is in a drop down list. The formula above works perfect, but i have the same cities listed several times in the table with the budgets updated for future years. I need the formula to recognize the region AND year from two different drop down lists. Any help is appreciated.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,980

    Re: return multiple items from one lookup

    The formula in E5 is not the one you were given. If you do as instructed in post #2, you will get this:

    Excel 2016 (Windows) 32 bit
    E
    F
    4
    City
    Budget
    5
    Buena Vista
    346000
    6
    Carson City
    28900
    7
    Vermont
    2367
    Sheet: Table
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    04-23-2009
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: return multiple items from one lookup

    Hi AliGW,

    You are correct, i uploaded the incorrect sheet. However, i am now having trouble with the sheet i initially had working. It is not returning the correct string of cities using the above formula (im sure i a missing something silly). That said, i also need this formula to now look at the year as a criteria as well. As of now it is returning both cities in a region although the data is for different years. I am attaching the correct sheet herein.
    Attached Files Attached Files

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

    Re: return multiple items from one lookup

    Try the following:
    For G5 and down (based on Ace_XL's formula):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    For H5 and down: =IF(G5="","",SUMIFS(Table1[Budget],Table1[Year],B$3,Table1[Region],D$3,Table1[City],G5))
    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. [SOLVED] Lookup multiple items and return in multiple tables
    By ima_ms in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 10-22-2019, 07:31 AM
  2. [SOLVED] return multiple items for one lookup value for a table
    By Crawfy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2017, 10:11 PM
  3. [SOLVED] Return Multiple Items with One Lookup Value
    By PMH2384 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-05-2016, 02:42 AM
  4. lookup a single value and return items in multiple columns
    By FredFitzgerald in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-20-2014, 03:29 PM
  5. [SOLVED] Return multiple items from two and three lookup values
    By bjnockle in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-12-2013, 01:14 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