Help with Index + Vlookup + multiple criteria including checkboxes across 2 tabs

GameofFormulas

New Member
Joined
Jun 7, 2016
Messages
5
Need help with a complex formula. I've been trying to figure it to no avail.

Tab 1 (filter dashboard) shows 16 different categories that appear in column A on tab 3 (complete data). Each category has a corresponding checkbox. I have already cell linked each checkbox so TRUE / FALSE appears for criteria purposes - I've just changed the text color to white so you don't see TRUE/FALSE. I would like for the data on tab 3 to be filtered and appear on tab 2 (filtered results) based on which checkboxes are checked on tab 1.

Note:
  • Each line-item on Tab 3 (complete data) can have 1 or more categories or "tags". The applicable categories for each line-item are shown in Column A and are comma separated.
  • Tab 3 (complete data) just shows dummy data except for the category column (A).
Appreciate your help!
 

Attachments

  • Tab 3 - complete data.PNG
    Tab 3 - complete data.PNG
    55.6 KB · Views: 6
  • Tab 1 - filter dashboard.PNG
    Tab 1 - filter dashboard.PNG
    20.3 KB · Views: 6
  • Tab 2 - filtered results.PNG
    Tab 2 - filtered results.PNG
    23.2 KB · Views: 6

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Here is my solution...
Book4
ABCDEFGHIJK
1TAB ONEADD THIS FORMULACreate this named rangeTAB 3 Column ACol E Referencing Column AColumn F Tab 3Column G Tab 3
2CatTRUE1CatDogFALSE02
3DogFALSE0BunnyGiraffe, BunnyTRUE24
4BunnyTRUE3FishDog, Bird, HamsterFALSE0 
5BirdFALSE0Label 7Cat FishTRUE4 
6FishTRUE5Label 9
7HamsterFALSE0Label 11
8Label 7TRUE7Label 13On Tab 2 in cell A2
9Label 8FALSE0 Giraffe, Bunny
10Label 9TRUE9 Cat Fish
11Label 10FALSE0  For the remaining columns you can adjust this formula to be looking at Tab 3 column B, C, & D
12Label 11TRUE11  
13Label 12FALSE0 
14Label 13TRUE13 
15Label 14FALSE0 
Sheet1
Cell Formulas
RangeFormula
I2:I5I2=SUMPRODUCT(--ISNUMBER(SEARCH(myCats,H2)))>0
J2:J5,C2:C15J2=(I2=TRUE)*ROW(H1)
K2:K3K2=IF(COUNTIF($J$2:$J$5,">"&0)>=ROWS($J$2:J2),SMALL($J$2:$J$5,ROWS($J$2:J2)+COUNTIF($J$2:$J$5,0)),"")
K4:K5K4=IF(COUNTIF($J$2:$J$5,">"&0)>=ROWS($J$2:J4),INDEX($H$2:$H$5,SMALL($J$2:$J$5,ROWS($J$2:J4)+COUNTIF($J$2:$J$5,0)),1),"")
H9:H12H9=IF(ROW(A1)<=COUNT(K:K),INDEX($H$2:$H$5,SMALL(K:K,ROW(A1)),1),"")
E2:E15E2=IF(COUNTIF($C$2:$C$15,">"&0)>=ROWS($E$2:E2),INDEX($A$2:$A$15,SMALL($C$2:$C$15,ROWS($E$2:E2)+COUNTIF($C$2:$C$15,0)),1),"")
Named Ranges
NameRefers ToCells
myCats=OFFSET(Sheet1!$E$1,1,0,COUNTIF(Sheet1!$C$2:$C$15,">"&0),1)E2:E15


I2 formula courtesy of this google search result...
Excel formula: Cell contains one of many things | Exceljet
 
Upvote 0
Thanks, BrainDiesel! I really appreciate your help.

Working through your instructions and got stuck on the difference in formulas for K2:K3 & K4:K5. Why are they different? Why are each only applied to half of the rows?
 
Upvote 0
Funny.... K4:K5 was probably written first unsuccessfully... K2:K3 was correct and I didnt drag it down as far
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,252
Members
449,075
Latest member
staticfluids

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