Subtracting 2 dates

minnie

New Member
Joined
Apr 25, 2002
Messages
28
I am trying to subtract two dates and even when the two cells are blank, I get .01 in the third cell where the result should go.

When I put in actual dates, the .01 gets added as an extra month.

For example:
Cell D22: 12/6/1994
Cell D23: 8/9/2002
Cell D24: 7.09

Cell D24 is a custom formatted cell as yy.mm

Any help on this is most appreciated.
 
Hi Mark:
Yours is more compact and elegant -- I had just wandered into this thread and suggested the modification that would be needed with the use of YearFrac function.

Your posts are always so insightful -- a MASTERPIECE!

Regards
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,214,606
Messages
6,120,487
Members
448,967
Latest member
visheshkotha

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