Forum Discussion
meg_89
Sep 12, 2022Copper Contributor
IF Statements - multiple criteria
I am trying to create IF statements that I can then add conditional formatting to colour code. This is what I has so far but I cannot figure the rest out. =IF(N2>G2,"Over-Min",IF(N2<G2,"Order",IF(...
PeterBartholomew1
Sep 12, 2022Silver Contributor
The expression
= (P2=N2=G2)is very unlikely to be what you require. Excel evaluates it left to right, first checking to see whether P2=N2 (returns TRUE or FALSE), then tests the result for equality with G2 (a count). I am rather guessing your requirement, but it may be something like
= IF(latestCount>Min,"Over-Min",
IF(latestCount<Min,"Order",
IF((latestCount=Min),
IF(MIN(INDEX(datedCounts,{1,3,5,7}))=latestCount,
"On Order",
"Min"
)
)
)
)- meg_89Sep 28, 2022Copper Contributor
Thank you, I ended up creating another column with a formula to pull from instead.