Filter function, adding another variable inside as a range

Hapakaya

New Member
Joined
Jul 13, 2021
Messages
10
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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
65,877
Office Version
  1. 365
Platform
  1. Windows
Will C9 only have All or Range?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
65,877
Office Version
  1. 365
Platform
  1. Windows
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))))
 
Solution

Hapakaya

New Member
Joined
Jul 13, 2021
Messages
10
Office Version
  1. 365
Platform
  1. Windows
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
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
65,877
Office Version
  1. 365
Platform
  1. Windows
Glad to help & thanks for the feedback.
 

Forum statistics

Threads
1,148,008
Messages
5,744,324
Members
423,862
Latest member
ExcelUserX

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
Top