Filter function with dropdown List

olund

New Member
Joined
Oct 17, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi folks.

I'm pretty new with excel and not so familiar with the coding yet so I am trying to make an way to filter some data from my dropdown list. Due to the amount of data I have them on multiple different sheets but I want to be able to collect the correct information with the dropdown list. To do that I figured that I could filter with the dropdown list as a target. So the way I did it was to use the dropdown list to grab the name of the sheet as well but it wont read it. So I basically hoped this would work: =FILTER(CONCAT(Data!A4,"Data",Data!B4)!A:T,CONCAT(Data!A4,"Data",Data!B4)!R:R=A4,0) where DataA4 reads the first part of the sheet name from the dropdown list while DataB4 reads the last part so when merged it shows brandDataMarket!A:T. Excel seems to not want to read it when I have grabbed the text from somewhere to use it for the filter. Anyone know the reason for this or have another way of doing it?

Thanks
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
where DataA4 reads the first part of the sheet name from the dropdown list while DataB4 reads the last part so when merged it shows brandDataMarket!A:T
When you want to create a range reference from text or cell content you need to use the INDIRECT function to convert it to a proper range reference.
Excel Formula:
=FILTER(INDIRECT("'"&Data!A4&"Data"&Data!B4&"'!A:T"),INDIRECT("'"&Data!A4&"Data"&Data!B4&"'!R:R")=A4,0)
This is likely to be slow to process with entire columns. Also, being a volatile function, it will calculate more often than other formulas which could make your workbook unuseable.

Edited formula, noticed missing apostrophe.
 
Last edited:
Upvote 0
Hi & welcome to MrExcel.
You need to use the indirect function, like
Excel Formula:
=FILTER(INDIRECT("'"&Data!A4&"Data"&Data!B4&"'!A:T&"),INDIRECT("'"&Data!A4&"Data"&Data!B4&"'!R:R")=A4,0)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
Does anyone know if the filter function and the results itself can go into a drop down list versus all spread in individual cells?
 
Upvote 0
No it can't, youu would need to have it in a cell & then refer to that cell in the data validation list.
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,268
Members
448,558
Latest member
aivin

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