datedif count down before or after today

pmvman

New Member
Joined
Jan 6, 2011
Messages
2
Hi,
I have a list of service dates the can be either a future date or a past date?
I want to reference the today function and look at the list of dates and tell me how many months have passed between the two dates.i would like it to show say 30 months to go till next service or -30 because it has passed its due service date?
I have looked at the formula's on FAQs but they only work one way and dont give a negative value . i need it to show both positive and negative values in months wether it is 30 months before todays date or after it and automatically update each time i open the sheet or workbook

Many thanks in advance
Pmvman
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hello Pmvman, welcome to MrExcel, you could try this formula to give you negative or positive months

=DATEDIF(MIN(A2,B2),MAX(A2,B2),"m")*SIGN(B2-A2)
 
Upvote 0
Barry,
Thanks very much for the quick reply that formula has done the trick. That is exactly what i was looking for.
Many thanks again
cheers Pmvman
 
Upvote 0

Forum statistics

Threads
1,215,014
Messages
6,122,697
Members
449,092
Latest member
snoom82

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