View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John C[_2_] John C[_2_] is offline
external usenet poster
 
Posts: 1,358
Default IF Formula Help Please

Have you actually evaluated your formula?

the portion IF(AG2:AN2="S" is only matching if AG2="S" and discarding the
rest.

Assuming you are saying that assuming your original AND and OR conditions
are not met, then you want to see if "S" appears by itself in any of the
range AG2:AN2, you could use this formula (not array).

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

Hope this helps.
--
John C


"Joe Gieder" wrote:

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