Subtracting Two Dates

EDJC

New Member
Joined
Apr 4, 2008
Messages
18
I have two questions. What would the formula be for subtracting two dates to get the numbers of years, months? I cannot get my formula to work.

Also, can Excel take a telephone number such as (555)-555-5555 can place the phone number in another field such as 555-555-5555?

Thank you for any assistance you may offer, I appreciate it,
Ed
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Regarding your first question, you can use =DATEDIF("Start Date","End Date","y").

Note: You can mention "y" in order to get difference in years, "d" in order to get the difference in days and "m" to get the difference in months.
 
Upvote 0
Stormseed, thank you for the prompt response. I used your formula of
=DATEDIF(F2,C8,Y) I have the two dates defined at dates. I get the error of #NAME?

Thank you.
 
Upvote 0
Can you not just do a normal subtract?

=A1-B1

And format the cell to "yy" if you only want to return the year?
 
Upvote 0
The exact format would be:

=DATEDIF("Start Date","End Date","y") where the start date is the reference to cell with the Starting Date and End Date would be the reference to the cell and letter y for years, m for months and d for days whould be in double quotes.

Alternatively, can you please let us know if you want to find the difference between dates in the same year ?
 
Upvote 0
I am using version Excel 2000.

I put the quotes on "Y", and it's still returning the error. I thought I could just do a normal subtract but it returns the following: 3/27/2009 - 3/27/2003 returns 2192.00

Mike, your answer to my second question worked GREAT. Thank you!

Ed
 
Upvote 0

Forum statistics

Threads
1,213,497
Messages
6,113,998
Members
448,541
Latest member
iparraguirre89

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