Is there a simpler way to write this array formula?

brandedge

New Member
Joined
Jan 4, 2018
Messages
1
I use an array formula to calculate the z score of numerical results in a list. The reason I use an array formula is because each result in the list is also part of a subgroup (subgroup labeling is in a different column in the same sheet; result is on the same row as its corresponding subgroup label). Therefore, the formula has conditions and only selects the mean and standard deviation associated with a result's subgroup. I am wondering if there is a more streamlined/efficient/simpler method to write my array formula:

=IF($L29=$E$2,ABS(G29-G$2)/G$3,IF($L29=$E$4,ABS(G29-G$4)/G$5,IF($L29=$E$6,ABS(G29-G$6)/G$7,IF($L29=$E$8,ABS(G29-G$8)/G$9,IF($L29=$E$10,ABS(G29-G$10)/G$11,"")))))

Column format is something like this:

Results / Subgroup Category / Z score.

Means and Stdevs are in lists above the results. This formatting lets me filter my results by z score to do rudimentary outlier assessment while keeping the means and stdevs static/not-part-of-the-filter.

The reason I ask if there is a more efficient way of writing my array formula is because I have a data set where I have two subgroup categories instead of one. So each permutation of subgroup 1 + subgroup 2 has its own mean and standard deviation of the results found in that particular dual subgroup. I would like to put a formula together to calculate z scores of these results based on what dual subgroup the result is found in. My first thought is to write a similar formula to the one above, however, I am looking at writing a formula for 40 dual subgroups instead.

Looking for suggestions
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Maybe index match?

Dtfszdl.png


Formula in I2:

=($G2-INDEX($B$2:$C$3,MATCH($H2,$A$2:$A$3,0),1))/INDEX($B$2:$C$3,MATCH($H2,$A$2:$A$3,0),2)
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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