View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default nested if statements using "AND" as well as "OR"


Or perhaps =IF(OR(AND(D4=I7,D4<=J7),AND(D4=G7, D4<=H7)), "YES","")
if I understand the OP correctly.
--
David Biddulph

"Sean Timmons" wrote in message
...
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.