Filter formula based on drop down BUT with an option for all data

Amo840812

New Member
Joined
Sep 5, 2024
Messages
7
Office Version
  1. 365
Platform
  1. Windows
I have a sheet with data called Combined. I have a second sheet called DC. On the DC sheet there is a drop-down list where I can select a person's name OR select ALL. I can get it to pull the information from the Combined sheet that matches the person's name. but I can't figure out how to get all the data to show if I pick ALL from the drop down.

The easiest solution would be not to use the DC sheet at all, but I don't know if that's even possible since I am pulling the data using Vstack. The combined sheet pulls data from 6 tables using VSTACK. If I could sort right on the Combined tab directly and get rid of DC altogether that would be fabulous.

My Vstack formula:
1726862525040.png


Total list of items from the combined list:

1726862297522.png



When selecting a name from the drop down:

1726862245092.png


When selecting ALL from the drop down:
1726862257827.png
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Please give us some sample data from your Combined sheet that we can copy and paste, and it would be helpful if you included the formula that you're using for the combined sheet to filter the name.
 
Upvote 0
As @Vogateer says, seeing your filter formula would be most helpful, but you could do something along the lines of:

Excel Formula:
=IF($C$1="ALL",VSTACK(LettersTable,...,etc), FILTER(VSTACK(LettersTable,...,etc),filter_range=$C$1,"Not found")

Obviously you need to make the appropriate substitutions in the VSTACK and also use the appropriate filter range.
 
Upvote 0
Apologies, this is the DC sheet formula currently. It works correctly if I select a name (shows only the rows assigned to them), but not when I select ALL as seen below:
1727100275899.png
 
Upvote 0
Excel Formula:
=IF(C1="ALL",Combined!A5:G500,FILTER(Combined!A5:G500,C1=Combined!G5:G500))
 
Upvote 0
Solution
If you want to get rid of DC try something like this on the Combined Sheet.
It looks like your criteria are in D1
G is column 7
Put your own Table Names into the VSTACK

Excel Formula:
=LET(vstComb,VSTACK(Table1,Table13),
     crit,D1,
     IF(crit="ALL",vstComb,FILTER(vstComb,CHOOSECOLS(vstComb,7)=crit)))
 
Upvote 1

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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