How do I tell Excel to calculate an expiry function from a 4 digit Week/Year number?

UnderTheArmour

New Member
Joined
Dec 29, 2021
Messages
8
Platform
  1. Mobile
Hi all ? I'm trying to get Excel to calculate an expiry from a 4 digit WeekMnth number...

I want it to read the number as WeekYear, and calculate 9 years and 9 months from it to either create a warning, or change the colour of a number of cells or something...

It's for a sheet I use all the time, so if it just changes the colour of a line of key cells in a given row that would be enough... It's to calculate the 10 year expiry dates for tires that I have on multiple vehicles...

So for example when it hits 9 years, 6 months past the start date it could go yellow, orange at 9 years 9 months, and red when at the 9 years, 51 weeks point or something...

Sorry to all that I can't use the awesome mini-sheet feature as I'm doing all of this through handheld Android devices...

Thanks in advance, Mick ??
 

Attachments

  • Screenshot_20211229-013954.png
    Screenshot_20211229-013954.png
    118.1 KB · Views: 22

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi UnderTheArmour,

I've converted to calendar dates and highlighted date within 180, 90 and 7 days.

UnderTheArmour.xlsx
ABCDEF
5Tyre SizeBrandTypeQtyDOTEXP
6333/22RNoskidWinter4221722-May-27
7333/22RNoskidSummer3391323-Sep-23
8333/22RNoskidAll Season5191807-May-28
9333/22RNopopWinter4181428-Apr-24
10333/22RNopopSummer4532127-Dec-31
11333/22RNoleakAll Season3261218-Jun-22
12333/22RNoleakSummer410101-Jan-11
13333/22RNoleakSummer431209-Jan-22
14333/22RNoleakSummer4221123-May-21
15333/22RNoleakSummer4221221-May-22
16333/22RNoleakSummer411201-Jan-22
17333/22RNoleakSummer4261218-Jun-22
18333/22RNoleakSummer431209-Jan-22
19
Sheet1
Cell Formulas
RangeFormula
F6:F18F6=IF(E6="","",EDATE(MAX(DATE(RIGHT(E6,2)+2000,1,1),DATE(RIGHT(E6,2)+2000,1,1)-WEEKDAY(DATE(RIGHT(E6,2)+2000,1,1),2)+(LEFT(TEXT(E6,"0000"),2)-1)*7+1),120))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F6:F999Expression=AND(F6<>"",F6-TODAY()>90,F6-TODAY()<=180)textNO
F6:F999Expression=AND(F6<>"",F6-TODAY()>7,F6-TODAY()<=90)textNO
F6:F999Expression=AND(F6<>"",F6-TODAY()<=7)textNO
 
Upvote 0
Wow Toadstool, that's some fine, slick Excelling!! EXCEL-lent! ??️✔️

I'm still having trouble with the conditional formatting as this is my option...
 

Attachments

  • Screenshot_20211231-091032.png
    Screenshot_20211231-091032.png
    75 KB · Views: 11
Upvote 0
As long as your first screen image was accurate then it looks like you want to highlight columns A to F based on the EXP date in column F.

If that's the case then your "Applies to" range should be column A and the first row of data through column F and the last possible row of data, e.g. $A$6:$F$999

Then you will need three Custom Formula rules, one for each colour, which are shown below under "Cells with Conditional Formatting".

UnderTheArmour.xlsx
ABCDEF
5Tyre SizeBrandTypeQtyDOTEXP
6333/22RNoskidWinter4221722-May-27
7333/22RNoskidSummer3391323-Sep-23
8333/22RNoskidAll Season5191807-May-28
9333/22RNopopWinter4181428-Apr-24
10333/22RNopopSummer4532127-Dec-31
11333/22RNoleakAll Season3261218-Jun-22
12333/22RNoleakSummer410101-Jan-11
13333/22RNoleakSummer431209-Jan-22
14333/22RNoleakSummer4221123-May-21
15333/22RNoleakSummer4221221-May-22
16333/22RNoleakSummer411201-Jan-22
17333/22RNoleakSummer4261218-Jun-22
18333/22RNoleakSummer431209-Jan-22
19
20
Sheet1
Cell Formulas
RangeFormula
F6:F18F6=IF(E6="","",EDATE(MAX(DATE(RIGHT(E6,2)+2000,1,1),DATE(RIGHT(E6,2)+2000,1,1)-WEEKDAY(DATE(RIGHT(E6,2)+2000,1,1),2)+(LEFT(TEXT(E6,"0000"),2)-1)*7+1),120))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A6:F999Expression=AND($F6<>"",$F6-TODAY()>90,$F6-TODAY()<=180)textNO
A6:F999Expression=AND($F6<>"",$F6-TODAY()>7,$F6-TODAY()<=90)textNO
A6:F999Expression=AND($F6<>"",$F6-TODAY()<=7)textNO
 
Upvote 0

Forum statistics

Threads
1,214,393
Messages
6,119,261
Members
448,880
Latest member
aveternik

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