Array formula (stdev if function) -> how to ignore blanks?

paupaj

New Member
Joined
Sep 16, 2020
Messages
3
Office Version
  1. 2010
Platform
  1. Windows
Hello,

Can anyone help me find a way for this function to ignore blank cells?

Yellow cell = Result without blank row {=STDEV.S(IF(A1:A3=A1,C1:C3),IF(B1:B3=B1,(D1:D3)*-1))}
Green cell = Result with blank row {=STDEV.S(IF(A1:A4=A1,C1:C4),IF(B1:B4=B1,(D1:D4)*-1))}

PP_excelforumx2.png

PP_excelforumx.png


The goal: green cell result = yellow cell result

Would really appreciate any help!
<3
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
The issue seems to be that a blank in columns C and D is treated as a 0 if the logical test results in a blank cell being included. I'm assuming you want to prevent these blank cells from being incorporated into the arrays as 0's, so I've added another logical expression to the part of the formula that forms the array arguments of STDEV.S IFERROR functions trap any division by 0 errors, replacing them with blanks. Results are shown in the orange and blue cells.
MrExcel20200915.xlsx
ABCD
1AppleBanana-77
2AppleCherry46-46
3DateBanana43-43
4AppleDate
5
629.7587529.75875
727.1016629.75875
paupaj
Cell Formulas
RangeFormula
A6A6=STDEV.S(IF(A1:A3=A1,C1:C3),IF(B1:B3=B1,(D1:D3)*-1))
B6B6=STDEV.S(IFERROR((C1:C3)/(A1:A3=A1)/(C1:C3<>""),""),IFERROR(-(D1:D3)/(B1:B3=B1)/(D1:D3<>""),""))
A7A7=STDEV.S(IF(A1:A4=A1,C1:C4),IF(B1:B4=B1,(D1:D4)*-1))
B7B7=STDEV.S(IFERROR((C1:C4)/(A1:A4=A1)/(C1:C4<>""),""),IFERROR(-(D1:D4)/(B1:B4=B1)/(D1:D4<>""),""))
Press CTRL+SHIFT+ENTER to enter array formulas surrounded with curly braces.
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,626
Members
449,093
Latest member
catterz66

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