DateDiff to return positive and negative numbers

marcus314

New Member
Joined
Jun 4, 2014
Messages
20
Hi,

I searched for a solution, but couldn't find one that fit my specific needs, so I thought I'd turn to this great forum!

I have a date in cell M2 and am wishing to calculate the date difference in days. The formula I created works great when there is a positive difference. However, for anything < 0, the cell is blank. I'm essentially trying to show both positive and negative values.

Excel Formula:
=IFERROR(DATEDIF(TODAY(),M2,"d"),"")

Any ideas how to adjust this formula to achieve this?

Thanks!
 
A tweak on Fluff's very simple approach which avoids the need to re-format the cell/column (assuming it was formatted as General to start with)

Excel Formula:
=N(M2-TODAY())
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,214,885
Messages
6,122,085
Members
449,064
Latest member
MattDRT

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