Calculating a variance between dates - without + or -

ejduran

New Member
Joined
Mar 15, 2007
Messages
19
Hello,

I want to calculate the variance between two dates without caring whether its positive or negative. If there is a difference, I want to know the number of days between the two dates. I have a fixed start date in all cases and various end dates where I want to calculate a variance for.

For example:
May 10th is my start date. The record has one end date of May 15th. And another end date of May 5th. I will get +5 days for the first and -5 days for the second. I just want to know that it's 5 days, period.

The next record in my query will have a difference start date and different end dates, could be earlier, could be later.

Any help is appreciated.

Thanks,
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Oh, I figured it out. I put ABS() around my DateDiff calculation to get the absolute value.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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