#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default IF statement

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default IF statement

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

"Connie Martin" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default IF statement


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

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

"bj" wrote:

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

"Connie Martin" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 418
Default IF statement

Connie Martin wrote:
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-M87,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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL concatenation statement CLamar Excel Discussion (Misc queries) 0 June 29th 06 01:58 PM
SET statement tutorial Daminc Excel Discussion (Misc queries) 13 January 17th 06 04:47 PM
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM
IF Statement nightmare eugenevr Excel Discussion (Misc queries) 6 May 18th 05 01:09 PM


All times are GMT +1. The time now is 01:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"