Using DATEDIF with multiple date criteria

Lstone1

New Member
Joined
Jan 17, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Is there a formula that will allow me to count days between a start date and end date if those days fall within another date range ? For example
Start Date=11/1/22 End Date=12/12/23.
I want a formula that will return the number of days between these 2 dates only if the days are between 10/1/22-9/30/23.
Thanks for the help!
 

Attachments

  • example.png
    example.png
    7.5 KB · Views: 9

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Welcome to the MrExcel forum!

Try:

Book1 (version 1).xlsb
ABCDEFGHI
1FY 202310/1/20229/30/2023
2Start DateEnd DateDays in 23Days in 24FY 202410/1/20239/30/2024
311/1/202212/12/202333372
Sheet11
Cell Formulas
RangeFormula
C3C3=MAX(0,MIN($B$3,I1)-MAX($A$3,H1))
D3D3=MAX(0,MIN($B$3,I2)-MAX($A$3,H2))
 
Upvote 0
Following the same type problem,
I want the number of days in an hotel between the range in cell B2 en C2.
The result should be in column D.
Anyone can help me on this?

1711209193824.png
 
Upvote 0
Welcome to the MrExcel forum!

For future reference, it's better to open a new thread when you have a question. Quite often no one will see if you add a post to the end of the existing thread.

As far as your question, try this in D5:

Excel Formula:
=IF(C5<=B5,"Error",C5-B5-1)
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

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