FILTER exclude results if a range contains any value/text

ausswe

New Member
Joined
Feb 19, 2013
Messages
40
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi all, I have the following formula that works fine and depends on if the user chooses a team in $D$5 or not:
Excel Formula:
=IF($D$5="";TAKE(SORT(FILTER(Data[[PERIOD]:[SPECIAL]];(Data[TOTALT]>60)*(Data[PERIOD]=$B$6));$A$6;-1);$E$5);TAKE(SORT(FILTER(Data[[PERIOD]:[SPECIAL]];(Data[TOTALT]>60)*(Data[PERIOD]=$B$6)*(Data[TEAM]=$D$5));$A$6;-1);$E$5))

I'm trying to figure out a way to exclude results in the filter if the user states "EXCLUDE" in cell $F$5 and any text/value is found in column (Data[NOTES]). If $F$5 contains "INCLUDE" or is empty I want it to include all results. I have tried various options but so far with no luck and I'm not sure if I'm overcomplicating the final formula so thought I'd look for ideas.

Thanks in advance
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try this
Excel Formula:
=TAKE(SORT(FILTER(Data[[PERIOD]:[SPECIAL]],(Data[TOTALT]>60)*(Data[PERIOD]=$B$6)*IF($D$5="",1,Data[TEAM]=$D$5)*IF($F$5="EXCLUDE",Data[NOTES]="",1)),$A$6,-1),$E$5)
 
Upvote 0
Solution
Hi Peter - yes that seems to be working.
I'll do some more testing during the week.

Interesting use if IF in FILTER like that, haven't seen that before.

Thank you so much!
 
Upvote 0
Hi Peter - yes that seems to be working.
I'll do some more testing during the week.

Interesting use if IF in FILTER like that, haven't seen that before.

Thank you so much!
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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