IF statement

G

Guest

Can anyone help me, please? Need an IF statement that would go like this:

If L8-M8=0,"",if E8 has TBG or PL in it, then calculate the difference
between L8 and M8 only when it exceeds 7 days

Thanks a bunch
Connie
 
G

Guest

try
=if(L8-M8=0,"",IF(or(E8="TBG",E8="PL"),if(L8-M8>7,L8-M7,"otherwise")))
putting in what you want for otherwise
 
G

Guest

try
=if(L8-M8=0,"",IF(or(E8="TBG",E8="PL"),if(L8-M8>7,L8-M7,"otherwise")))
putting in what you want for otherwise
 
G

Guest

=IF(AND(OR(E8="TBG",E8="PL"),L8-M8>7),L8-M8,"")

assuming that if L8-M8<=7 you want blank and this covers the L8-M8 condition
 
G

Guest

=IF(AND(OR(E8="TBG",E8="PL"),L8-M8>7),L8-M8,"")

assuming that if L8-M8<=7 you want blank and this covers the L8-M8 condition
 
J

joeu2004

Connie said:
Can anyone help me, please? Need an IF statement that would go like this:
If L8-M8=0,"",if E8 has TBG or PL in it, then calculate the difference
between L8 and M8 only when it exceeds 7 days

Only if what exceeds 7 days? I assume you mean that L8 and M8 contain
dates. I wonder if this is what you want:

=if(L8-M8<=7, "", if(or(E8="TBG",E8="PL"), L8-M8, ""))

That can also be written:

=if(and(L8-M8>7,or(E8="TBG",E8="PL")), L8-M8, "")

That says: display L8-M8 only if E8 is TGB or PL and L8-M8 exceeds 7
days; otherwise, display a blank cell.
 
J

joeu2004

Connie said:
Can anyone help me, please? Need an IF statement that would go like this:
If L8-M8=0,"",if E8 has TBG or PL in it, then calculate the difference
between L8 and M8 only when it exceeds 7 days

Only if what exceeds 7 days? I assume you mean that L8 and M8 contain
dates. I wonder if this is what you want:

=if(L8-M8<=7, "", if(or(E8="TBG",E8="PL"), L8-M8, ""))

That can also be written:

=if(and(L8-M8>7,or(E8="TBG",E8="PL")), L8-M8, "")

That says: display L8-M8 only if E8 is TGB or PL and L8-M8 exceeds 7
days; otherwise, display a blank cell.
 

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

Similar Threads

IF with substraction 8
help reducing this long nested functuion? 3
Figuring 24 Hours Per Day 5
Nested if 4
NETWORKDAYS 3
Formula help 3
Nested IF Statements 2
Sumproduct, 3 columns and date 3

Top