I am trying to calculate the standard deviation for data points that must meet two conditions. The specific example is: The standard deviation of yields for the crop variety "Z1" in the region "A" have to be calculated. I have a list of several thousand yields with corresponding region and variety. In the table below, there are 3 values that meet this condition (1500, 1800, 1600), so the result should be the standard deviation for these values and all other yields should be ignored.
Region Variety Yield
A Z1 1500
B Z1 2100
B X2 1900
A X1 1700
C Z2 2000
C X1 1500
A Z1 1800
B Z2 2500
C X1 1700
A Z1 1600
I tried using this formula, but it does not work (also not as array formula) and only returns "FALSE"
=IF(AND(Region="A",Variety="Z1"),STDEV.S(Yield))
Thank you very much for helping me to solve this!
=STDEV.S(IF(Region="A",IF(Variety="Z1",Yield)))
– SJR