Calculate days between three dates

SaraWitch

Active Member
Joined
Sep 29, 2015
Messages
378
Office Version
  1. 365
Platform
  1. Windows
Hello peeps,

I want to calculate the days remaining from an expected end date and today but if a completion date is entered, then calculate number of days between this and received date.

I can get the formula to calculate the first bit but not the second:
¦ MrExcel Queries.xlsm
ABCDEFG
1AddressNotice received dateExpected end datePre-workDays to complete
2RequiredDate completedDays to completeshould be
3Gnome Cave08/07/202404/08/2024Yes10/07/2024162
Sheet3
Cell Formulas
RangeFormula
C3C3=B3+27
F3F3=IF(A3="","",IF(D3="No","",IF(D3="","",IF(D3="Yes",C3-TODAY(),IF(E3>0,B3-E3)))))
Cells with Data Validation
CellAllowCriteria
D3ListYes, No


Hope this makes sense, and any help would be appreciated! :)
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
@SaraWitch Does this help?
AutoTraining2.xlsm
ABCDEF
1AddressNotice received dateExpected end datePre-work
2RequiredDate completedDays to complete
3Gnome Cave4548145508Yes454832
Sheet5
Cell Formulas
RangeFormula
C3C3=B3+27
F3F3=IF(OR(A3="",D3<>"Yes"),"",IF(E3>1,E3-B3,C3-TODAY()))
 
Upvote 0
Solution
Brilliant! Thank you, Joe! 🤩

I've also added to it to exclude bank holidays, which seems to work:
¦ MrExcel Queries.xlsm
ABCDEFGHIJ
1Days to completeBH 2024/25
2AddressNotice received dateExpected end datePre-workWorking daysWorking days - BH01/04/2024
3RequiredDate completedDays to complete06/05/2024
4Gnome Cave20/05/202416/06/2024Yes30/05/2024109827/05/2024
526/08/2024
625/12/2024
726/12/2024
801/01/2025
Days between 3 dates (2)
Cell Formulas
RangeFormula
C4C4=B4+27
F4F4=IF(OR(A4="",D4<>"Yes"),"",IF(E4>1,E4-B4,C4-TODAY()))
G4G4=IF(OR(A4="",D4<>"Yes"),"",IF(E4>1,NETWORKDAYS(B4,E4),NETWORKDAYS(TODAY(),C4)))
H4H4=IF(OR(A4="",D4<>"Yes"),"",IF(E4>1,NETWORKDAYS(B4,E4,J2:J8),NETWORKDAYS(TODAY(),C4,J2:J8)))
Cells with Data Validation
CellAllowCriteria
D4ListYes, No

Appreciate both your help, thank you...
 
Upvote 0
You are welcome.
Glad we were able to help!
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,114
Members
453,021
Latest member
Justyna P

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