An MOT due date formula

les361800

New Member
Joined
Jul 11, 2023
Messages
27
Office Version
  1. 365
Platform
  1. Windows
A kind soul yesterday helped me with a formula for a vehicle maintenance sheet yesterday. I have an additional request.

Can someone please help me out with a formula that gives an "MOT due in..." time, but takes into account the fact that an MOT is only due after 3 years? I have added a date of manufacture column.

A little help with the conditional formatting to get it red when overdue would also be most appreciated.

Thank you very much Excel wizards!
 

Attachments

  • Screenshot 2023-07-12 131108.png
    Screenshot 2023-07-12 131108.png
    55.3 KB · Views: 24

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Try adding this formula to cell K2 and copy down:
Excel Formula:
=IF(J2>0,EDATE(J2,36),IF(B2>0,EDATE(B2,36),""))
What it does is first look at column J, and if there is a date there, will calculate 3 years from that date.
If there is no date in column J, it will look at column B, and if there is a date there, it will calulcate 3 years from that date.

Then, for conditional formatting on column K, use the following Conditional Formatting formula:
Excel Formula:
=K2<TODAY()
 
Upvote 0
Try adding this formula to cell K2 and copy down:
Excel Formula:
=IF(J2>0,EDATE(J2,36),IF(B2>0,EDATE(B2,36),""))
What it does is first look at column J, and if there is a date there, will calculate 3 years from that date.
If there is no date in column J, it will look at column B, and if there is a date there, it will calulcate 3 years from that date.

Then, for conditional formatting on column K, use the following Conditional Formatting formula:
Excel Formula:
=K2<TODAY()
Thanks very much Joe! Is it possible to have it so that it calculates just the 1 year from column J?

My bad, I didn't explain this!
 
Upvote 0
Try adding this formula to cell K2 and copy down:
Excel Formula:
=IF(J2>0,EDATE(J2,36),IF(B2>0,EDATE(B2,36),""))
What it does is first look at column J, and if there is a date there, will calculate 3 years from that date.
If there is no date in column J, it will look at column B, and if there is a date there, it will calulcate 3 years from that date.

Then, for conditional formatting on column K, use the following Conditional Formatting formula:
Excel Formula:
=K2<TODAY()
No matter I figured it out!! THANK YOU :)
 
Upvote 0
If you take a look at the EDATE function (see: Excel EDATE function to add or subtract months from date), you will see that the second argument is just the number of months you want to add to a date.
So to get 1 year instead of 3, just change 36 to 12 for that part of the formula, i.e.
Excel Formula:
=IF(J2>0,EDATE(J2,12),IF(B2>0,EDATE(B2,36),""))
 
Upvote 0
Solution
If you take a look at the EDATE function (see: Excel EDATE function to add or subtract months from date), you will see that the second argument is just the number of months you want to add to a date.
So to get 1 year instead of 3, just change 36 to 12 for that part of the formula, i.e.
Excel Formula:
=IF(J2>0,EDATE(J2,12),IF(B2>0,EDATE(B2,36),""))
Fixed it! Thanks :)

Is it possible to add a *MOT Due in X months" counter like the service column?
 

Attachments

  • Screenshot 2023-07-12 145627.png
    Screenshot 2023-07-12 145627.png
    25.1 KB · Views: 6
Upvote 0
To borrow some of the logic from that other formula, you could do something like the following in cell I2:
Excel Formula:
=IF(M2>TODAY(),"Service Due in " & TEXT((M2-TODAY())/30,"0.0") & " months","")
 
Upvote 0

Forum statistics

Threads
1,215,078
Messages
6,122,997
Members
449,093
Latest member
masterms

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