View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sean Timmons Sean Timmons is offline
external usenet poster
 
Posts: 1,696
Default nested if statements using "AND" as well as "OR"

if(OR(AND(I7=G7,J7<=H7),AND(d4=G7, d4<=H7)), "YES"," ")

"ibbm" wrote:

I am trying to write a conditional statement where if a the time in cell D4
is between range1(G7-H7) or range2(I7-J7) then say YES else leave blank.
I'm trying if(and(d4=G7, d4<=H7), "YES"," ") which works but I don't know
how to get the OR in their.

Any help you give me will be so appreciated!

Thanks in advance.