Stdev

EJohnson99202

New Member
Joined
Nov 7, 2017
Messages
7
Hello, I am trying to pull a Standard Deviation based on a specific group and can not seem to get the formula quite right.

I have a list of account numbers in column A, count of days between bills in column B and wanting to put the standard deviation in column C.

[TABLE="width: 233"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Acct #[/TD]
[TD]Days/Bills[/TD]
[TD]StdDev[/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]31[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]28[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]123[/TD]
[TD]35[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]456[/TD]
[TD]10[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]456[/TD]
[TD]14[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]456[/TD]
[TD]11[/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]

How can I get the Standard Deviation to only account for the rows where the account numbers match, so my results are "4" for Rows 1 - 3 and "2" for Rows 4 - 6 and not show "11" for the whole column B?

PS: I'm working on a sheet with over 24K rows and over 2K different account numbers.

Thank you in advance!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
This is an array formula and must be entered with CTRL-SHIFT-ENTER.
I used STDEV for a sample, you may need to change to population.
Excel Workbook
ABC
1Acct #Days/BillsStdDev
2123313.512
312328
412335
5456102.082
645614
745611
Sheet
 
Upvote 0
Spreadsheet Formulas
CellFormula
C2{=IF(COUNTIF($A$2:$A2,$A2)>1,"",STDEV.S(IF($A$2:$A$7=$A2,$B$2:$B$7)))}

<tbody>
</tbody>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<tbody>
</tbody>


That worked perfect! Thank you so much!!
 
Upvote 0
Pivot Table:

[Table="width:, class:grid"][tr][td="bgcolor:#C0C0C0"][/td][td="bgcolor:#C0C0C0"]
A​
[/td][td="bgcolor:#C0C0C0"]
B​
[/td][td="bgcolor:#C0C0C0"]
C​
[/td][td="bgcolor:#C0C0C0"]
D​
[/td][td="bgcolor:#C0C0C0"]
E​
[/td][td="bgcolor:#C0C0C0"]
F​
[/td][/tr][tr][td="bgcolor:#C0C0C0"]
1​
[/td][td="bgcolor:#F3F3F3"]
Acct #
[/td][td="bgcolor:#F3F3F3"]
Days/Bills
[/td][td="bgcolor:#F3F3F3"]
StdDev
[/td][td="bgcolor:#F3F3F3"]
[/td][td="bgcolor:#DCE6F1"]Row Labels[/td][td="bgcolor:#DCE6F1"]StdDev of Days/Bills[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
2​
[/td][td]
123​
[/td][td]
31​
[/td][td][/td][td][/td][td]123[/td][td]
3.512​
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
3​
[/td][td]
123​
[/td][td]
28​
[/td][td][/td][td][/td][td]456[/td][td]
2.082​
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
4​
[/td][td]
123​
[/td][td]
35​
[/td][td][/td][td][/td][td="bgcolor:#DCE6F1"]Grand Total[/td][td="bgcolor:#DCE6F1"]
11.077
[/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
5​
[/td][td]
456​
[/td][td]
10​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
6​
[/td][td]
456​
[/td][td]
14​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]
[tr][td="bgcolor:#C0C0C0"]
7​
[/td][td]
456​
[/td][td]
11​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]
 
Upvote 0
You're welcome. Thanks for the feedback and welcome to the forum.
SHG use of a pivot table will also get what you want.
 
Upvote 0

Forum statistics

Threads
1,223,977
Messages
6,175,753
Members
452,667
Latest member
vanessavalentino83

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