We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Excel Formula Query
Options

shaz77_2
Posts: 1,881 Forumite
in Techie Stuff
Hi All,
I have two columns on an excel spreadsheet with dates in each of the columns, is there a way to calculate the difference in days between the two dates? I tried a simple A1-B1 formula, however it's returning minus figures as some of the dates in column A are prior to those in column B.
Thanks
I have two columns on an excel spreadsheet with dates in each of the columns, is there a way to calculate the difference in days between the two dates? I tried a simple A1-B1 formula, however it's returning minus figures as some of the dates in column A are prior to those in column B.
Thanks
0
Comments
-
You can use DATEDIF. This is totally undocumented but the syntax is
=DATEDIF(A1,B1,"Interval")
Where interval is "D" for days, "Y" for years etc. The letter must be in quotesThis is a system account and does not represent a real person. To contact the Forum Team email forumteam@moneysavingexpert.com0 -
Would the exact formula be =DATEDIF(A1,B1,"DDMMYYYY")?0
-
Use the absolute value.
=ABS(A1-B1)0 -
Sorted, thanks.0
This discussion has been closed.
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 350.8K Banking & Borrowing
- 253.1K Reduce Debt & Boost Income
- 453.5K Spending & Discounts
- 243.8K Work, Benefits & Business
- 598.7K Mortgages, Homes & Bills
- 176.8K Life & Family
- 257.1K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.1K Discuss & Feedback
- 37.6K Read-Only Boards