I'm attempting to run a STDEV.P on a specific population that has 3 criteria. I did this with AVERAGEIFS and it worked perfectly.
Here's the equation I have:
{=STDEV.P(IF((Adjusted_Player_Data!A:A=Sim_FG!A3,Adjusted_Player_Data!AK:AK=SImulated_Outcome!H3),Adjusted_Player_Data!K:K,""))}
Adjusted_Player_Data!A:A is a player name list
Sim_FG!A3 is the player I'm looking up
Player_Data!AK:AK is the scale names (Low, Med, High)
Simluated_Outcome!H3 is the scale I am trying to match.
Adjusted!K:K is the range I am running the STDEV.P against.
Basically I need to match player and scale from big list. My averageifs function works perfectly and this is what it is: =IF(SImulated_Outcome!M2="Y",AVERAGEIFS(Adjusted_Player_Data!K:K,Adjusted_Player_Data!A:A,Sim_FG!A3,Adjusted_Player_Data!AK:AK,SImulated_Outcome!H3),"")
I've found answer below on nesting but now I want to include another criteria. If M2=Y then run a similar STDEV.
=IF(SImulated_Outcome!M2="Y",STDEV.P(IF(Adjusted_Player_Data!A:A=Sim_FG!A3,IF(Adjusted_Player_Data!AK:AK=SImulated_Outcome!H3,IF(Adjusted_Player_Data!AP:AP=1,Adjusted_Player_Data!K:K),STDEV.P(IF(Adjusted_Player_Data!A:A=Sim_FG!A3,IF(Adjusted_Player_Data!AK:AK=SImulated_Outcome!H3,IF(Adjusted_Player_Data!AP:AP=0,Adjusted_Player_Data!K:K))))))))
You need to use nested IF
s in STDEV.P
:
=STDEV.P(IF(Adjusted_Player_Data!A:A=Sim_FG!A3,IF(Adjusted_Player_Data!AK:AK=SImulated_Outcome!H3,Adjusted_Player_Data!K:K,""),""))