View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default If / And / Or Macro

Try this

=IF(AND(A1="x",COUNTIF(A2:A10,"y")0),"Statement A","Statement B")

Mike

"Graeme" wrote:

Basic question: I am trying to write a macro that looks to see whether A1 =
"X" and also if any of A2...10 = "Y", then Statement A, else Statement B.
Thank you in advance.