Filter Formula Issues

Pestomania

Active Member
Joined
May 30, 2018
Messages
332
Office Version
  1. 365
Platform
  1. Windows
Hello!!

I have this formula which works perfect to show ALL items, but I want to filter by location and Risk Category options, but cannot get it to work.

This one works perfect to show ALL records, regardless of location or category.
Excel Formula:
=TEXTJOIN(", ",,FILTER(Risk_Table[Index '#],(Risk_Table[Likelihood]=Sheet1!D$6)*(Risk_Table[Cost Impact]=Sheet1!$B1)*(Risk_Table[Location]=$K$1)*(Risk_Table[Risk Category]=$K$2),""))

This one works if there is a field in location and category, but if location or category, it returns a #Value.
Excel Formula:
=TEXTJOIN(", ",,FILTER(Risk_Table[Index '#],(Risk_Table[Likelihood]=Sheet1!C$6)*(Risk_Table[Cost Impact]=Sheet1!$B1)*IF($K$1<>"",(Risk_Table[Location]=$K$1),"")*IF($K$2<>"",(Risk_Table[Risk Category]=$K$2),""),""))

I want to ensure that if either field are null, it results in no filtering for that field.

Book2
ABCDEFGHIJK
1LikelihoodExtreme (>$10M)     Site LocationDallas, TX
2High (>$5M)  1  Risk CategoryStrategic - Technology
3Moderate (>$2M)     
4Slightly (<$2M)     
5Negligible     
6Extreme (>90%)High (>75%)Moderate (>50%)Low (>10%)Negligible (<10%)
7Likelihood
Sheet1
Cell Formulas
RangeFormula
C1C1=TEXTJOIN(", ",,FILTER(Risk_Table[Index '#],(Risk_Table[Likelihood]=Sheet1!C$6)*(Risk_Table[Cost Impact]=Sheet1!$B1)*IF($K$1<>"",(Risk_Table[Location]=$K$1),"")*IF($K$2<>"",(Risk_Table[Risk Category]=$K$2),""),""))
D1:G1,C2:G5D1=TEXTJOIN(", ",,FILTER(Risk_Table[Index '#],(Risk_Table[Likelihood]=Sheet1!D$6)*(Risk_Table[Cost Impact]=Sheet1!$B1)*(Risk_Table[Location]=$K$1)*(Risk_Table[Risk Category]=$K$2),""))
Named Ranges
NameRefers ToCells
Cost_Impact=Sheet1!$B$1:$B$5C1:G1
Likelihood=Sheet1!$C$6:$G$6C1:C5
Cells with Data Validation
CellAllowCriteria
K1List=Locations
K2List=Risk_Category
 
You're welcome & thanks for the feedback.
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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