standard deviation of a range to only include values >0 and <100

bonisko

New Member
Joined
Dec 4, 2020
Messages
3
Office Version
  1. 2013
Platform
  1. Windows
Hi!

I have Rows and Rows of data that include data of interest. :)
These rows also have blank cells, cells with value 0, cells with value 100, and some that have #DIV/0!
I want to calculate the standard deviation of the range (1 row), but only of the data of interest.
I have found ways to calculate the average and the the number of data points:
=AVERAGEIFS(J7:J228, J7:J228, "<99.99", J7:J228, ">0")
=COUNTIFS(J7:J228,"<99.99",J7:J228,">0")
Both work as expected.
Thanks in advance!
Bruce
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
1,347
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Use this and Press Ctrl+Shift+Enter:
Excel Formula:
=STDEV.S(IF(J7:J228="","",IFS(J7:J228<100,J7:J228,J7:J228>0,J7:J228)))
 

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
1,347
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
This is corrected Version (Press Ctrl+Shift+Enter):
Excel Formula:
=MIN(STDEV.S(IF(J7:J228="","",IF(J7:J228<100,J7:J228))),STDEV.S(IF(J7:J228="","",IF(J7:J228>0,J7:J228))))
 

bonisko

New Member
Joined
Dec 4, 2020
Messages
3
Office Version
  1. 2013
Platform
  1. Windows
Thanks. However, I enter and see the {} around the txt as expected for an array formula, but I get output of #DIV/0!

Help again please?

Thanks,

Bruce
 

AhoyNC

Well-known Member
Joined
Oct 10, 2011
Messages
4,720
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

You need to get rid of the #DIV/0! error in your data. Use something like the IFERROR function to remove the errors as in the example below (cell J11 has an error).
Then try the formula below, about the same as maabadi had.
It is an array formula and must be entered with CTRL-SHIFT-ENTER.

Book2
IJ
6Std. Dev.25.87792
7-45
865
9
1082
11 
1222
130
14
1545
16
Sheet2
Cell Formulas
RangeFormula
J6J6=STDEV.S(IF(J7:J228>0,IF(J7:J228<99.99,J7:J228)))
J11J11=IFERROR(L11/M11,"")
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Solution

AhoyNC

Well-known Member
Joined
Oct 10, 2011
Messages
4,720
Office Version
  1. 365
Platform
  1. Windows
You're welcome. Thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,978
Messages
5,599,154
Members
414,293
Latest member
Kaydot

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
Top