Nested If Statement

T

Tracey

Hi

I'm needing to calculate the following

If A1=True AND B1=False then calculate duration from start date and time to
SLA end time (this is on sheet 2 - vlookup??)

would the same format of the statement work if A2=False and B2=true ?

many thanks for your help
Tracey
 
J

JLatham

If you want to do somthing when either:
A1=True and B1=False
and when
A1=False and B1=True
then you want to do it when both conditions are not the same, so you can
write one formula to handle both:
=IF(A1<>B1,"do my work","both are same value")

The "do my work" portion could be any valid operation, including doing some
math with the results of a couple of VLOOKUPs. Same for "both are same
value" - could be different math, or just "" to leave the cell looking empty.
 
M

Mike H

Tracey,

If the only possibilities for A1 and b1 are TRUE/False then you could do this

=IF(A1<>B1,"Do My Vlookup","Do Something else")
or
=IF(A1+B1=1,"Do My Vlookup","Do Something else")

Mike
 
T

Tracey

I have the following but it just brings back "BI777"

=IF(AND(BE777="true",BF777="false"),BL777-BB777,IF(AND(BE777="false",BF777="true"), BC777-BK777,BI777))
 
P

Pete_UK

Remove the quotes from around True and False - they are not text
values.

Hope this helps.

Pete
 

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