Months between two dates

Tentonhammer69

New Member
Joined
Jun 2, 2016
Messages
9
I am creating a pro-rated battery calculator and I need a formula to show the number of months between two dates were if it is 24 months and one day it would show as 25. [TABLE="width: 500"]
<tbody>[TR]
[TD]date battery was installed[/TD]
[TD]current date[/TD]
[TD]=DATEDIF(A2,B2,"M")[/TD]
[/TR]
[TR]
[TD]9/25/2015[/TD]
[TD]9/26/2017[/TD]
[TD]24(formula answer)[/TD]
[/TR]
[TR]
[TD]9/25/2015[/TD]
[TD]9/26/2017[/TD]
[TD]25(answer I want)[/TD]
[/TR]
</tbody>[/TABLE]

According to the warranty company that battery is in the first day of the 25th month and it gets moved into the 25-32 month pro-rated period. I would need the formula to see that its 24 months and one day and round it up to 25 months. I hope I explained this clearly.
 
Last edited:

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Maybe: =DATEDIF(A2,B2,"M")+IF(DATEDIF(A2,B2,"MD")>0,1,0)
 
Last edited:
Upvote 0
Is this an Access or Excel question?
I ask because you posted the question in the Access forum, but the formula you posted looks like an Excel one.
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,595
Members
452,657
Latest member
giadungthienduyen

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