nested if statements using "AND" as well as "OR"

I

ibbm

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.
 
D

David Biddulph

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top