Networkdays Formula IF/OR Cell has Open or Closed

EvanDef

New Member
Joined
Jan 6, 2014
Messages
21
Hello Excel Gurus!

I am befuddled over an IF/OR function in Column M (M2) of Networkdays where if Column L (L2) has "Closed" as a status Networkdays calculates the difference between J2(start date),K2(end date),HOLIDAYS in M2. But if Column L (L2) has "Open" as a status Networkdays calculates the difference between J2(start date),TODAY(end date),HOLIDAYS. Also, if Column L is marked as "Closed" but there is no date populated in the corresponding end date cell (K), ERROR should be returned to prompt data entry corrections.

J - Start Date
K - End Date
L - Status
M - Bus Days
10/26/13
12/3/13
Closed
11/21/13
1/9/14
Closed
1/27/14
Open
2/21/14
3/27/14
Closed
3/20/14
Closed

<tbody>
</tbody>


I appreciate your time, Thanks!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi

How about somerthing like this:
=IF(L2="Open",NETWORKDAYS(J2,NOW()),IF(LEN(K2)=0,"ERROR",NETWORKDAYS(J2,K2)))

Amend the formula to suit your own holidays etc.

I trust this helps
Andrew
 
Upvote 0
Andrew,

That worked like a charm! I tried to nest my IF statements but I kept getting a negative value. I completely overlooked the character length (LEN) value and NOW function as options. Thanks for your direction.

Regards, Evan
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top