# Standard Deviation on Spilled Range with IF

#### Winston

##### New Member
I currently have two spilled ranges of data starting in row 3 of column AH and AH as shown:

I wanted to determine the Average and Standard Deviation in scores for each reviewer in the spilled ranges. I created a list of Unique Reviewers (column AK) using the UNIQUE function that returned a spilled range in row 3, as expected. I then was able to use the AVERAGEIFS function to create the average score (column AL) for each unique reviewer, returning a spilled range using:

=AVERAGEIFS(\$AH\$3#,\$AG\$3#,AK3#)

My challenge now is doing the same to calculate the Standard Deviation for each unique reviewer (Column AM). I was able to simply use the following and manually drag down into each row of column AM for this:

=STDEV(FILTER(\$AH\$3#,AK3=\$AG\$3#))

but, this is not a spilled range and requires me to manually adjust the column length if there are any changes in the spilled range size of the other columns.

My Question: Is there a single formula I can use in cell AM3 that will result in a spilled range result of standard deviation for each unique reviewer, similarly to the AVERAGEIFS function?

### Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

#### StephenCrump

##### MrExcel MVP
Welcome to the Forum!

At the risk of embarrassment, I'll stick my neck out and say you can't do it in a single array formula using STDEV.

But with a bit of contrivance: =SQRT(TRANSPOSE(MMULT(SEQUENCE(,ROWS(AG3#),1,0),--IF(AG3#=TRANSPOSE(AK3#),(AH3#-TRANSPOSE(AL3#))^2)))/(COUNTIF(AG3#,AK3#)-1))

#### Winston

##### New Member
Thank you!!! I now see the logic...very ingenious...worked perfectly!

Replies
4
Views
174
Replies
4
Views
107
Replies
3
Views
201
Replies
3
Views
283
Replies
3
Views
262

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,152,126
Messages
5,768,266
Members
425,460
Latest member
Astros1243

### 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.

### Which adblocker are you using?

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

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