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
=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