Filter function with more than 1 option same collumn

fleyd

New Member
Joined
Jan 21, 2020
Messages
22
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. Web
Hello,

1.
I have a excel file where i can choose many parameters and filter function will filter results according to those parameters. It was working great until the moment i need to choose for the same parameter, more than one option.

For the parameter "Port" i may or may not have to choose more than one option, but my formula only works for one condition for one parameter, not more. How can i change the formula being able to choose more than 1 "Port" ?

I need the rest of the formula to work, like sorting (end of the formula).

Here is the formula i currently have in B7:

Excel Formula:
=IFERROR(SORT(FILTER(Jobs!P3:X500; IF(C2="";ROW(Jobs!Q3:Q500);Jobs!Q3:Q500=C2)* IF(D2="";ROW(Jobs!R3:R500);Jobs!R3:R500=D2)* IF(E2="";ROW(Jobs!S3:S500);Jobs!S3:S500=E2)* IF(F2="";ROW(Jobs!T3:T500);Jobs!T3:T500=F2)* IF(G2="";ROW(Jobs!U3:U500);Jobs!U3:U500=G2)* IF(H2="";ROW(Jobs!V3:V500);Jobs!V3:V500=H2)* IF(I2="";ROW(Jobs!W3:W500);Jobs!W3:W500=I2)* IF(J2="";ROW(Jobs!X3:X500);Jobs!X3:X500=J2)); IF(M2="";1;MATCH(M2;B6:J6;0));IF(N2="Asc";1;-1));"Sem Navios")

Believe it's easier with the example in the attached picture.

2.
Also, is there a simple code/Script i can place a folder path in cell A1 (example) and clicking a button, that path will open in windows file explorer? Please consider i'll be using excel for the web, not offline .


For both my questions, please consider i'm using Excel for the Web, not Excel "offline", since the offline i can only use version from 2016, and filter function, or sort, or unique functions...
 

Attachments

  • filter function.PNG
    filter function.PNG
    93 KB · Views: 7

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
How about
Excel Formula:
=IFERROR(SORT(FILTER(Jobs!P3:X500, IF(C2="",ROW(Jobs!Q3:Q500),Jobs!Q3:Q500=C2)* IF(D2="",ROW(Jobs!R3:R500),Jobs!R3:R500=D2)* IF(E2="",ROW(Jobs!S3:S500),Jobs!S3:S500=E2)* IF(F2="",ROW(Jobs!T3:T500),COUNTIFS(F2:F4,Jobs!T3:T500))* IF(G2="",ROW(Jobs!U3:U500),Jobs!U3:U500=G2)* IF(H2="",ROW(Jobs!V3:V500),Jobs!V3:V500=H2)* IF(I2="",ROW(Jobs!W3:W500),Jobs!W3:W500=I2)* IF(J2="",ROW(Jobs!X3:X500),Jobs!X3:X500=J2)), IF(M2="",1,MATCH(M2,B6:J6,0)),IF(N2="Asc",1,-1)),"Sem Navios")
 
Upvote 0
Solution
How about
Excel Formula:
=IFERROR(SORT(FILTER(Jobs!P3:X500, IF(C2="",ROW(Jobs!Q3:Q500),Jobs!Q3:Q500=C2)* IF(D2="",ROW(Jobs!R3:R500),Jobs!R3:R500=D2)* IF(E2="",ROW(Jobs!S3:S500),Jobs!S3:S500=E2)* IF(F2="",ROW(Jobs!T3:T500),COUNTIFS(F2:F4,Jobs!T3:T500))* IF(G2="",ROW(Jobs!U3:U500),Jobs!U3:U500=G2)* IF(H2="",ROW(Jobs!V3:V500),Jobs!V3:V500=H2)* IF(I2="",ROW(Jobs!W3:W500),Jobs!W3:W500=I2)* IF(J2="",ROW(Jobs!X3:X500),Jobs!X3:X500=J2)), IF(M2="",1,MATCH(M2,B6:J6,0)),IF(N2="Asc",1,-1)),"Sem Navios")
Hi,

I tested it briefly and believe it's working. Thanks a lot for the help!!

About my 2º question can you also help? Since i'll be using this in Excel for the web, any ideia on a script i can use to open a folder/path i place for example in cell A1, open it in Windows file explorer?

Many thanks!
 
Upvote 0
I know nothing about xl online scripting language.
I would suggest that you start another thread for that question.
 
Upvote 0
@Fluff , thanks for help on the formula.

I will open another thread for the script question.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,909
Messages
6,122,189
Members
449,072
Latest member
DW Draft

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