Combining NETWORKDAYS with IF, THEN, OR formulas

searchingforhelp

Board Regular
Joined
Nov 11, 2020
Messages
67
Office Version
  1. 365
Platform
  1. Windows
I am having trouble combining formulas and deciphering which formula is best for what is needed. I am currently using the NETWORKDAYS formula, but I cannot connect it with what I am trying to accomplish due to my skill sets.

What I need assistance in is as follows:

1. the formula needs to calculate business days only, excluding weekends.

2. I would need to calculate the days from when the assignment was originally assigned (Column A) to the date when assignment was completed (Column C). However, if there is a reassignment date (column B), have the formula automatically adjust to calculate the reassignment date (Column B) to when the assignment was completed (column C).

3. Lastly, if the reassignment date (Column B) exceeds the assignment completion date, automatically calculate original assigned date (Column A) from when the assignment was completed.

This is where I am stuck. Combining 1,2 and 3 into one formula so I can drag down as more data is entered on the sheet.

Thanking you in advance for any help you can provide.

Example.xlsx
ABCD
1Date when Originally assignedDate when assignment was reassignedDate when assignment was completedNumber of Days
23/10/20213/12/20213
33/10/20213/11/20213/18/20216
43/10/20213/15/20203/11/20212
Sheet1
Cell Formulas
RangeFormula
D2,D4D2=NETWORKDAYS(A2,C2)
D3D3=NETWORKDAYS(B3,C3)
 
Why should D4 be not & not 1, or have you moved the goalposts again?
So sorry, my apologies, I confused myself. D4 is correct. What about D3? Should it not calculate 2 days? Given that D2 and D4 is calculated correctly.
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
So sorry, my apologies, I confused myself. D4 is correct. What about D3? Should it not calculate 2 days? Given that D2 and D4 is calculated correctly.
So sorry, my apologies, I confused myself. D4 is correct. What about D3? Should it not calculate 2 days? Given that D2 and D4 is calculated correctly?
I noticed when dragging the formula downward it starts to give me incorrect results. For example row 5 D5. The formula is suppose to calculate A and B given that B does not exceed C.

Copy of Example 2.xlsx
ABCDE
1Date when Originally assignedDate when assignment was reassignedDate when assignment was completedFormula that was provided: =NETWORKDAYS(IF(B2>C2,A2,MAX(A2,B2)),IF(AND(B2<>"",B2<C2),B2,C2)) NETWORKDAYS formula only for column A and B
23/10/20213/13/202133
33/10/20213/11/20213/18/202112
43/10/20213/15/20213/10/202114
53/10/20213/17/20213/18/202116
Sheet1 (4)
Cell Formulas
RangeFormula
D2:D5D2=NETWORKDAYS(IF(B2>C2,A2,MAX(A2,B2)),IF(AND(B2<>"",B2<C2),B2,C2))
E2E2=NETWORKDAYS(A2,C2)
E3:E5E3=NETWORKDAYS(A3,B3)
 
Upvote 0
Ok, how about
Excel Formula:
=IF(AND(B2<C2,B2<>""),NETWORKDAYS(A2,B2),NETWORKDAYS(A2,C2))
 
Upvote 0
Hi Fluff,

Thank you for volunteering to assist me with two complex formulas. These formulas will play a great role in what I am trying to accomplish. Without them, I would have defaulted to multiple small formulas in separate columns to complete a result. Please feel free to let me how you can receive recognition for assisting me.

Thank you.

Originally assigned

=IF(AND(B2<C2,B2<>""),NETWORKDAYS(A2,B2),NETWORKDAYS(A2,C2)

Assignment reassignments

=IF(OR(B2="",B2>C2),"not applicable",NETWORKDAYS(IF(B2>C2,A2,MAX(A2,B2)),C2))

Copy of Example 2.xlsx
ABCDE
1Date when Originally assignedDate when assignment was reassignedDate when assignment was completedOriginally assignedAssignment Reassigned
23/10/20213/13/20213not applicable
33/10/20213/11/20213/18/202126
43/10/20213/15/20213/10/20211not applicable
53/10/20213/17/20213/18/202162
Working on
Cell Formulas
RangeFormula
D2:D5D2=IF(AND(B2<C2,B2<>""),NETWORKDAYS(A2,B2),NETWORKDAYS(A2,C2))
E2:E5E2=IF(OR(B2="",B2>C2),"not applicable",NETWORKDAYS(IF(B2>C2,A2,MAX(A2,B2)),C2))
 
Upvote 0

Forum statistics

Threads
1,214,813
Messages
6,121,706
Members
449,048
Latest member
81jamesacct

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