Networkdays Result

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
922
Office Version
  1. 365
Hi,

I have the following table:

Excel Workbook
BCDEF
2M1M2M3*Desired Result
307/19/1007/25/1007/25/10*5
406/27/1007/01/1007/02/10*4
506/28/10*07/05/10*5
607/13/1007/21/1007/20/10*5
Sheet1




I need to build a formula in column F for the following criteria:

1) If M2 is same as M3, then use networkdays to calculate the difference of days from M1 to M3. ( M1 is the start date and M3 is the end date)
2) If M2 is less than M3, then deduct 1 day from the result of networkdays from M1 to M3.( M1 is the start date and M3 is the end date)
3) If M2 is empty, then use networkdays to calculate the difference of days from M1 to M3. ( M1 is the start date and M3 is the end date)
4) If M2 is more than M3, then use networkdays to calculate the difference of days from M1 to M3. ( M1 is the start date and M3 is the end date)

The desired result is stated in column F.

Appreciate assistance.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Considering that the outcome of condition 1, 2, and 4 is the same, here's the formula -

=IF(OR(B3>=C3,ISBLANK(B3)),NETWORKDAYS(A3,C3),NETWORKDAYS(A3,C3)-1)

Does this help ?
 
Upvote 0
barry / prabby,

Thank you both for the suggested solutions. Both worked !

Appreciate your valuable time, effort and patience !
 
Upvote 0

Forum statistics

Threads
1,214,426
Messages
6,119,417
Members
448,895
Latest member
omarahmed1

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