Date calculation

srizki

Well-known Member
Joined
Jan 14, 2003
Messages
1,841
Office Version
  1. 365
Platform
  1. Windows
I have dates in two columns and I am trying to calculate number of months, that is not a problem, the problem is that when a month starts and finish in the same month DATEDIF gives zero, for example, starting dare 01/01/2009 ending date 01/31/2009.
How can I alter the formula to get one month of fraction of a month if there are less days than a full month.

Thanks
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Add an if statement. =if(datedif=0, (date1-date2)/30, datedif)

it won't be exact. Especially in February, but it's going to be close. I guess it depends how accurate you need it. If you're measuring in months would .13 months really throw a wrench into things if were really .15?

HTH
Roger
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,072
Latest member
DW Draft

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