Exclude False from Array Formula

johnmpc

Board Regular
Joined
Oct 19, 2020
Messages
108
Office Version
  1. 365
Platform
  1. Windows
Hi All,

Should be simple hopefully.

I have this formula

Excel Formula:
=IF(C3:BH3="SICK",C2:BH2)

It returns the date in the cell range C2:BH2 if the cell below in C3:BH3 has "SICK".

Is there an edit to exclude the False and Blank results from an array?

Thanks
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Upvote 0
Solution
How about
Excel Formula:
=IF(C3:BH3="SICK",C2:BH2,"")
 
Upvote 0
How about
Excel Formula:
=IF(C3:BH3="SICK",C2:BH2,"")
This just turns False to Blank.

MrExcelPlayground7.xlsx
CDEFGHIJKLMNOPQ
21/1/20221/2/20221/3/20221/4/20221/5/20221/6/20221/7/20221/8/20221/9/20221/10/20221/11/20221/12/20221/13/20221/14/20221/15/2022
3SickSickSickSickSick
41/2/20221/4/20221/5/20221/10/20221/14/2022
Sheet5
Cell Formulas
RangeFormula
D2:Q2D2=C2+1
C4:G4C4=FILTER(IF(C3:Q3="Sick",C2:Q2),SIGN(IF(C3:Q3="Sick",C2:Q2)),"")
Dynamic array formulas.
Pretty sure this is exactly what i want, Thank you. Will report back.
 
Upvote 0
James' formula can be shortened a bit:

Excel Formula:
=FILTER(C2:Q2,C3:Q3="Sick")
This is so simple. Thanks. i will definitely use in the future. However, i need it to remove Blank results from the array also, which James' formula does.
MrExcelPlayground7.xlsx
CDEFGHIJKLMNOPQ
21/1/20221/2/20221/3/20221/4/20221/5/20221/6/20221/7/20221/8/20221/9/20221/10/20221/11/20221/12/20221/13/20221/14/20221/15/2022
3SickSickSickSickSick
41/2/20221/4/20221/5/20221/10/20221/14/2022
Sheet5
Cell Formulas
RangeFormula
D2:Q2D2=C2+1
C4:G4C4=FILTER(IF(C3:Q3="Sick",C2:Q2),SIGN(IF(C3:Q3="Sick",C2:Q2)),"")
Dynamic array formulas.
Absolutely spot on. Thanks.
 
Upvote 0
Just trying with old method ....

Data - C2 to Q3 as per OP

01-01-2022​
02-01-2022​
03-01-2022​
04-01-2022​
05-01-2022​
06-01-2022​
07-01-2022​
08-01-2022​
09-01-2022​
10-01-2022​
11-01-2022​
12-01-2022​
13-01-2022​
14-01-2022​
15-01-2022​
SickSickSickSickSick
02-Jan-22​
04-Jan-22​
05-Jan-22​
10-Jan-22​
14-Jan-22​
02-Jan-22​
04-Jan-22​
05-Jan-22​
10-Jan-22​
14-Jan-22​

C6 : Q6 =IFERROR(INDEX($C$2:$Q$2,AGGREGATE(15,6,(COLUMN($C$2:$Q$2)-COLUMN($C$2)+1)/(C$3="Sick"),COLUMNS($C6:C6))),"")
C7 : Q7 =IFERROR(SMALL($C$6:$Q$6,COLUMNS($C7:C7)),"")
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,382
Members
448,889
Latest member
TS_711

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