Hi all:
I have sheet Revenue with: Column(A) = "Store_code", Column(B) = "Store_name", Column(C) = "Revenue", Column(D) = "Profit"
Now I want to have macro to do that:
with i = 2 to last row
If Average(C2:Ci)>STDEV.P(C2:Ci) then
if Ci-(Average(C2:Ci)+STDEV.P(C2:Ci))>0 then Ei.value = "GOOD"
if Ci-(Average(C2:Ci)-STDEV.P(C2:Ci))<0 then Ei.value = "BAD"
Else Ei.value = "NOMAL"
Else If Average(C2:Ci)<=STDEV.P(C2:Ci) then
if Ci-(Average(C2:Ci)+STDEV.P(C2:Ci))>0 then Ei.value = "GOOD"
if Ci-Average(C2:Ci)<0 then Ei.value = "BAD"
Else Ei.value = "NOMAL"
End if
Please help me to do with code VBA, thanks
I have sheet Revenue with: Column(A) = "Store_code", Column(B) = "Store_name", Column(C) = "Revenue", Column(D) = "Profit"
Now I want to have macro to do that:
with i = 2 to last row
If Average(C2:Ci)>STDEV.P(C2:Ci) then
if Ci-(Average(C2:Ci)+STDEV.P(C2:Ci))>0 then Ei.value = "GOOD"
if Ci-(Average(C2:Ci)-STDEV.P(C2:Ci))<0 then Ei.value = "BAD"
Else Ei.value = "NOMAL"
Else If Average(C2:Ci)<=STDEV.P(C2:Ci) then
if Ci-(Average(C2:Ci)+STDEV.P(C2:Ci))>0 then Ei.value = "GOOD"
if Ci-Average(C2:Ci)<0 then Ei.value = "BAD"
Else Ei.value = "NOMAL"
End if
Please help me to do with code VBA, thanks