Date difference

SanjayaGarg

New Member
Joined
Nov 10, 2017
Messages
27
Office Version
  1. 2013
Platform
  1. Windows
Hello ! I want to calculate difference between start date and end date. While doing so using 'datedif' formula, I am getting result as follows :
A
B
C
D
Start Date
End Date
Result
Formula
16-04-202115-04-20220 Years, 11 Months, 30 DaysIF(A3="","",DATEDIF(A3,B3,"Y")&" Years, "&DATEDIF(A3,B3,"YM")&" Months, "&DATEDIF(A3,B3,"MD")&" Days")

The result should be 1 year as 30 days equal to 1 month and 12 months equal to 1 year.

Please make any correction if possible.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Try

Book1
ABCD
1
2
34/16/20214/15/20221 Years, 0 Months, 0 Days
4
Sheet1
Cell Formulas
RangeFormula
C3C3=IF(A3="","",DATEDIF(A3,B3+1,"Y")&" Years, "&DATEDIF(A3,B3+1,"YM")&" Months, "&DATEDIF(A3,B3+1,"MD")&" Days")
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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