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.
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.
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 *
Genius; thank you Ace!
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.
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 5Buena Vista 346000 6Carson City 28900 7Vermont 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.
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.
Try the following:
For G5 and down (based on Ace_XL's formula):Formula: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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks