Filter function, adding another variable inside as a range

Hapakaya

New Member
Joined
Jul 13, 2021
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hello, I currently have a table of data that I filter through. The variables use to filter include manufacturer, tonnage and type. These can all be listed as "All" or only some, or they can all be specified. However, in my tonnage drop down list I only have a specific tonnage. IE 2,3,4,5.... I would like to add in the drop down list "Range" and then I have another drop down list area that I will specify a min and max tonnage value.
Here is a snap of my search sheet.
1626978053544.png


And here is the formula I use (Thanks Fluff):
=LET(Rws,SEQUENCE(ROWS(Tab!C3:C702),,,0),FILTER(Tab!F3:Z702,(IF(B9="All",Rws,Tab!D3:D702=B$9))*(IF(C9="All",Rws,Tab!C3:C702=C$9))*(IF(D9="All",Rws,Tab!E3:E702=D$9))))

Here is some more context for cell data:
1626978216673.png


and the sheet that Im using to provide the data:
1626978255914.png
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Will C9 only have All or Range?
 
Upvote 0
Ok, how about
Excel Formula:
=LET(Rws,SEQUENCE(ROWS(Tab!C3:C702),,,0),FILTER(Tab!F3:Z702,(IF(B9="All",Rws,Tab!D3:D702=B$9))*(IF(C9="All",Rws,IF(C9="Range",(Tab!C3:C702>=H9)*(Tab!C3:C702<=I9),Tab!C3:C702=C$9)))*(IF(D9="All",Rws,Tab!E3:E702=D$9))))
 
Upvote 0
Solution
Ok, how about
Excel Formula:
=LET(Rws,SEQUENCE(ROWS(Tab!C3:C702),,,0),FILTER(Tab!F3:Z702,(IF(B9="All",Rws,Tab!D3:D702=B$9))*(IF(C9="All",Rws,IF(C9="Range",(Tab!C3:C702>=H9)*(Tab!C3:C702<=I9),Tab!C3:C702=C$9)))*(IF(D9="All",Rws,Tab!E3:E702=D$9))))
You've done it again Fluff, thanks very much
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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