View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 1,311
Default IF Formula Help Please

I'm assuming you want to know if all eight cells (AG2:AN2) are S.
If that is the case, then the last IF statement needs to be first. The way
you have it, the first IF statement is satisfied before it gets to the last
one.

Try is this way:

=IF(COUNTIF(AG2:AN2,"S")=8,"G",IF(AND(AG2="S",AH2= "S"),"Y",IF(OR(AG2="U",AH2="U"),"R")))

HTH,
Paul

--

"Joe Gieder" wrote in message
...
Fist, thank you for your help.
I have this array formula in Z2:
{=IF(AND((AG2)="S",(AH2)="S"),"Y",IF(OR((AG2)="U", (AH2)="U"),"R",IF(AG2:AN2="S","G","R")))}
but it doesn't work. When it evals the AND and OR portions it works ok but
when S is in AG2:AN2 it doesn't give the result of "G", it stays a "Y".
What
did I do wrong? Also do I have the AND and OR functions written correctly?

Thanks in advance for your help
Joe