use INDEX formula in Excel for gathering multiple search items

Half Measures

New Member
Joined
Dec 16, 2020
Messages
26
Office Version
  1. 365
Platform
  1. Windows
On the "List" worksheet, I have an inventory of Food, Music, Activity and Color that a Customer uses listed into columns. On a "Search" worksheet I have created PickLists cataloguing the Food, Music, Activity and Color available for Customers.

My goal with this is to create an INDEX formula for finding which Customers are utilizing a chosen item from the PickLists? These would be done by aligning the Row of a Customer and Item listed that they are using, from the "List" worksheet. A VLOOKUP formula only shows one result, and only shows the first one in the search. I’m looking for a way to result all the Customers using the chosen item.

I wanted to attach the Excel doc here that I'm talking about, for a better example. But, I couldn't find a way to do that. I'm new here. So, here are some screen-shot's visualizing what I'm talking about.


List worksheet.jpg
Search worksheet PickLists.jpg
Search worksheet search formula.jpg
 
You need to change the formula back to what I suggested, otherwise it won't work.
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Here is my first worksheet called "List"

Copy of Customer Test Forms - Copy (1).xlsx
ABCDE
1FoodMusicActivityCustomerColor
2pizzacountrywalkingAlice's kitchenred
3hamburgermetaltalkingAlice's kitchenblue
4spaghetticlassicalAlice's kitchengreen
5rapAlice's kitchenyellow
6Alice's kitchenorange
7spaghettipoptalkingDonovan's backyardred
8sandwichescountrysleepingDonovan's backyardyellow
List
And this is second worksheet called "Search"

Copy of Customer Test Forms - Copy (1).xlsx
ABCDEFGH
1
2FoodMusicActivityColor
3pizzametaltalkingyellow
4
5
6CustomerCustomerCustomerCustomer
7Alice's kitchen#N/A#N/A#N/A
8Alice's kitchen
9Alice's kitchen
10Alice's kitchen
11Alice's kitchen
12Alice's kitchen
13Alice's kitchen
14Alice's kitchen
15Alice's kitchen
16Alice's kitchen
17Alice's kitchen
Search
Cell Formulas
RangeFormula
D7D7=VLOOKUP(D3,List!A1:E8,4,FALSE)
F7F7=VLOOKUP(F3,List!A1:E8,4,FALSE)
H7H7=VLOOKUP(H3,List!A1:E8,4,FALSE)
B7:B17B7=IFERROR(INDEX(List!$D$2:$D$8,AGGREGATE(15,6,(ROW(List!$D$2:$D$8)-ROW(List!$D$2)+1)/(List!$A$2:$A$8=Search!$B$3),ROWS(Search!$B$7:$B$7))),"")
Cells with Data Validation
CellAllowCriteria
D3Listcountry, metal, classical, rap, pop
F3Listsleeping, talking, walking
H3Listred, yellow, blue, green, orange
B3List=List!$A$2:$A$8
 
Upvote 0
See post#21
Ha Ha! I think it's working now! Thank you so much!!

Copy of Customer Test Forms - Copy (1).xlsx
ABCDEFGH
1
2FoodMusicActivityColor
3sandwichesmetaltalkingyellow
4
5
6CustomerCustomerCustomerCustomer
7Donovan's backyard#N/A#N/A#N/A
8Alice's kitchen
9 
10 
11 
12 
13 
14 
15 
16 
17 
Search
Cell Formulas
RangeFormula
D7D7=VLOOKUP(D3,List!A1:E8,4,FALSE)
F7F7=VLOOKUP(F3,List!A1:E8,4,FALSE)
H7H7=VLOOKUP(H3,List!A1:E8,4,FALSE)
B7:B17B7=IFERROR(INDEX(List!$D$2:$D$8,AGGREGATE(15,6,(ROW(List!$D$2:$D$8)-ROW(List!$D$2)+1)/(List!$A$2:$A$8=B3),ROWS(B$7:B7))),"")
Cells with Data Validation
CellAllowCriteria
D3Listcountry, metal, classical, rap, pop
F3Listsleeping, talking, walking
H3Listred, yellow, blue, green, orange
B3List=List!$A$2:$A$8
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
My pleasure.
Eh...still running into some problems. Thought I had copied/pasted and edited the formulas right. But, they aren't giving great results in the other cells.

One customer is showing up twice in one. And the full list of customers isn't showing up in the other.

not working.jpg


Copy of Customer Test Forms - Copy (1).xlsx
ABCDEFGH
1
2FoodMusicActivityColor
3sandwichespopsleepingyellow
4
5
6CustomerCustomerCustomerCustomer
7Donovan's backyardDonovan's backyardDonovan's backyardAlice's kitchen
8Alice's kitchen Alice's kitchen 
9  Alice's kitchen 
10    
11    
12    
13    
14    
15    
16    
17    
Search
Cell Formulas
RangeFormula
B7:B17B7=IFERROR(INDEX(List!$D$2:$D$8,AGGREGATE(15,6,(ROW(List!$D$2:$D$8)-ROW(List!$D$2)+1)/(List!$A$2:$A$8=B3),ROWS(B$7:B7))),"")
D7:D17D7=IFERROR(INDEX(List!$D$2:$D$8,AGGREGATE(15,6,(ROW(List!$D$2:$D$8)-ROW(List!$D$2)+1)/(List!$B$2:$B$8=D3),ROWS(D$7:D7))),"")
F7:F17F7=IFERROR(INDEX(List!$D$2:$D$8,AGGREGATE(15,6,(ROW(List!$D$2:$D$8)-ROW(List!$D$2)+1)/(List!$C$2:$C$8=F3),ROWS(F$7:F7))),"")
H7:H17H7=IFERROR(INDEX(List!$D$2:$D$8,AGGREGATE(15,6,(ROW(List!$D$2:$D$8)-ROW(List!$D$2)+1)/(List!$E$2:$E$8=H3),ROWS(H$7:H7))),"")
Cells with Data Validation
CellAllowCriteria
D3Listcountry, metal, classical, rap, pop
F3Listsleeping, talking, walking
H3Listred, yellow, blue, green, orange
B3List=List!$A$2:$A$8
 
Upvote 0
Eh...still running into some problems. Thought I had copied/pasted and edited the formulas right. But, they aren't giving great results in the other cells.

One customer is showing up twice in one. And the full list of customers isn't showing up in the other.

View attachment 28105

Copy of Customer Test Forms - Copy (1).xlsx
ABCDEFGH
1
2FoodMusicActivityColor
3sandwichespopsleepingyellow
4
5
6CustomerCustomerCustomerCustomer
7Donovan's backyardDonovan's backyardDonovan's backyardAlice's kitchen
8Alice's kitchen Alice's kitchen 
9  Alice's kitchen 
10    
11    
12    
13    
14    
15    
16    
17    
Search
Cell Formulas
RangeFormula
B7:B17B7=IFERROR(INDEX(List!$D$2:$D$8,AGGREGATE(15,6,(ROW(List!$D$2:$D$8)-ROW(List!$D$2)+1)/(List!$A$2:$A$8=B3),ROWS(B$7:B7))),"")
D7:D17D7=IFERROR(INDEX(List!$D$2:$D$8,AGGREGATE(15,6,(ROW(List!$D$2:$D$8)-ROW(List!$D$2)+1)/(List!$B$2:$B$8=D3),ROWS(D$7:D7))),"")
F7:F17F7=IFERROR(INDEX(List!$D$2:$D$8,AGGREGATE(15,6,(ROW(List!$D$2:$D$8)-ROW(List!$D$2)+1)/(List!$C$2:$C$8=F3),ROWS(F$7:F7))),"")
H7:H17H7=IFERROR(INDEX(List!$D$2:$D$8,AGGREGATE(15,6,(ROW(List!$D$2:$D$8)-ROW(List!$D$2)+1)/(List!$E$2:$E$8=H3),ROWS(H$7:H7))),"")
Cells with Data Validation
CellAllowCriteria
D3Listcountry, metal, classical, rap, pop
F3Listsleeping, talking, walking
H3Listred, yellow, blue, green, orange
B3List=List!$A$2:$A$8
This cell isn't giving all the customers either. Not sure what I did wrong.

not working either.jpg
 

Attachments

  • not working either.jpg
    not working either.jpg
    110.4 KB · Views: 4
Upvote 0
The formula does not exclude duplicate values, because you never said it should. ;)
If you are missing values then it's probably because on the list sheet the values are not exactly the same as D2. Check for typos & leading/trailing spaces.
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top