DATEDIF function query

Julio Medallion

Board Regular
Joined
Sep 15, 2010
Messages
56
I am using the DATEDIF function to calculate the number of days or months
between dates, e.g. DATEDIF(A1,B1,"m"), using d for days and m for months in the formula. My query is- is it possible to work out the number of weeks using this formula? Using "w" in the formula returns a #NUM! error.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Isn't number of weeks the same as getting the number of days and dividing by 7?
 
Upvote 0
Yes, I had actually thought of that, I was just wondering if there was an equivalent to the day or month i.e. d or m in writing the formula?

Which leads to my next question when using the month formula, two of my formulas are calculating the number of months, both cells have 30 days in them but one formula calculates it as 1 and another calculates it as 0. Does the formula intervals have to have the same start dates, i.e. with (1/1,1/2) the formulacalculates 1 month,but the formula that calcuates 0 months starts (2/10/11,1/11/11).
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

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