Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Multi-Conditional IF Statements

Hello...

I have a dilemma that I may be making harder than it needs to be. I
have a spreadsheet with 3 columns, contain 3 specific dates. What I
need to do is to compare these columns, and calculate the NETWORKDAYS
between dates. The problem is this: If column C is blank, then I want
the NETWORKDAYS between columns A and B. If column C is filled, I want
the NETWORKDAYS between columns A and C. I can get either the first
sequence or the second sequence to work fine, but not both at the same
time. My main issue I believe is when calculating the NETWORKDAYS...
If column A is larger than column B, no problem. But if column B is
larger than column A, it returns a negative value, which is what I
want, but the calculation is off. Below is the date I am using...

SLA Date Production Date Deliverable Date Net-Work Days SLA Made by
03/10/06 03/03/06 5
03/08/06 03/09/06 -1
03/09/06 03/09/06 0
03/15/06 03/09/06 03/22/06 FALSE

=IF(F6="",IF(E6<D6,NETWORKDAYS(E6,D6,$M$6:$M$14)-1,IF(E6D6,NETWORKDAYS(E6,D6,$M$6:$M$14)+1,IF(E6=D 6,NETWORKDAYS(E6,D6,$M$6:$M$14)-1))))

The problem is that the formula I use above works great, until column C
is populated, and then I get a FALSE return due to my IF(F6=""
statement (F6 is the deliverable date column in the example above). Is
there an easier way to account for both this column being blank and/or
filled?

Thanks ahead of time for any help.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Multi-Conditional IF Statements

Okay... I think I have figured out my own question... I use the
following formula and it works just fine:

=IF(AND(F6="",E6<D6),NETWORKDAYS(E6,D6,M$6:M$14)-1,IF(AND(F6="",E6D6),NETWORKDAYS(E6,D6,M$6:M$14)+ 1,IF(AND(F6="",E6=D6),"0",IF(F6<"",NETWORKDAYS(F6 ,D6,M$6:M$14)+1,0))))

However, if anyone has something a little more direct or simple, I am
always open to learning new approaches! Thanks for your time...

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Multi-Conditional IF Statements

You could use the IsBlank function
=IF(AND(ISBLANK(F6),E6<D6)....
I don't know if it will save you anything but you could try it.
Mark

"stacy" wrote:

Okay... I think I have figured out my own question... I use the
following formula and it works just fine:

=IF(AND(F6="",E6<D6),NETWORKDAYS(E6,D6,M$6:M$14)-1,IF(AND(F6="",E6D6),NETWORKDAYS(E6,D6,M$6:M$14)+ 1,IF(AND(F6="",E6=D6),"0",IF(F6<"",NETWORKDAYS(F6 ,D6,M$6:M$14)+1,0))))

However, if anyone has something a little more direct or simple, I am
always open to learning new approaches! Thanks for your time...


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Multi-Conditional IF Statements


You should be able to simplify so that NETWORKDAYS isn't repeated, try

=IF(E6=D6,0,NETWORKDAYS(IF(F6,F6,E6),D6,M$6:M$14)-SIGN(D6-IF(F6,F6,E6))

--
daddylongleg
-----------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...fo&userid=3048
View this thread: http://www.excelforum.com/showthread.php?threadid=52542

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
Multi-column conditional formatting learningdba Excel Discussion (Misc queries) 2 October 1st 08 04:37 AM
Multi-conditional count [email protected] Excel Worksheet Functions 4 June 17th 07 04:30 PM
Multi-Conditional Functions DHaze Excel Worksheet Functions 2 June 7th 07 08:19 PM
multi conditional searching realspido Excel Worksheet Functions 3 April 27th 06 09:50 AM
Multi-conditional sum with VBA code ?? staying Excel Programming 4 July 7th 05 08:55 AM


All times are GMT +1. The time now is 02:00 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"