Trying to construct an equipment-tracking spreadsheet that can display CURRENT, EXPIRING, EXPIRED by comparing a given date to today's date

mgorchard

New Member
Joined
Jul 17, 2018
Messages
4
Hi everyone,

I am trying to put together what I feel is a reasonably simple spreadsheet but my complete lack of experience with Excel is hindering me to the point where I'm struggling to even know what terms to Google in order to learn more - I apologise if this is very basic information that is widely available, but I can assure you I did spend several hours trying to work this out myself. I would really appreciate any insight anybody can offer.

The purpose of the spreadsheet is to track equipment that requires inspection on a six monthly or twelve monthly basis and represent upcoming inspection deadlines in a visually clear way.

As you can see in the attached image, it is currently able to display either CURRENT or EXPIRED by comparing the TI Expiry and EIT Expiry dates against the current date - the two expiry date columns are currently configured to display a date exactly 12 months after the date entered as the TI Date and EIT Date.

hc5W05.jpg

<today(),"expired","current"))

The main problem I am trying to overcome at the moment is I have no idea how to configure the Status cells to display three or even four different statements based on the proximity to the current date. I would like to display a different message in the Status cells when there is 3-12 months remaining before due date, 1-3 months remaining, less than 1 month remaining and overdue. If possible, I would like to pair this with a green/amber/orange/red shading of the entire row.

ULVhFY.jpg


The second thing I would like to implement is configuring the Frequency cell to be a modifier on the TI Expiry cell - for example, if you enter '6' in the Frequency cell, the TI Expiry cell will show a date 6 months after the date entered in the TI Date cell and if you enter '12' it will generate a date 12 months after. I'd actually prefer this to be a drop-down box that only offers the options '6 Months' and '12 Months' but I feel like drop down boxes are probably several levels above what I am capable of at the moment though I am open to suggestions.

I very much appreciate your time if you have made it this far through my post and look forward to any suggestions anybody can offer, thank you.</today(),"expired","current"))
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hi & welcome to MrExcel.
To get the colours you can use CF
Select your data (row 5 onwards) > Home Tab > Conditional formatting > New rule > Use a formula > =EDATE($N5,12)>TODAY() > select format > ok
Then repeat above with =EDATE($N5,3)>TODAY() After clicking Ok check the Stop if True box.
Same again with =EDATE($N5,1)>TODAY() & finally =$N5>TODAY()
 
Upvote 0
to answer your second question first, you almost got it with the setup in Col K and N.

instead of =date(year(j5)+1,month(j5),day(j5), you can substitute the +1 to +I5, i.e.

=date(year(j5)+I5,month(j5),day(j5)

similar for Col N

back to your first question excel store the dates in serial nos.

basically your are comparing 2 dates (numbers), e.g. K5 and L5

so, you can construct your formula like this

Code:
=if(K5 < today(),"overdue",if(K5 < today()+1months,"less than 1 month",if(K5 < today()+3months,"1-3 months","3-12 months")))
 
Upvote 0
Hi & welcome to MrExcel.
To get the colours you can use CF
Select your data (row 5 onwards) > Home Tab > Conditional formatting > New rule > Use a formula > =EDATE($N5,12)>TODAY() > select format > ok
Then repeat above with =EDATE($N5,3)>TODAY() After clicking Ok check the Stop if True box.
Same again with =EDATE($N5,1)>TODAY() & finally =$N5>TODAY()

Thanks very much - I tried this and it kind of seemed like it was working but maybe I am missing something.. it seems like each rule was over writing the one before it? I have put some sample dates in the TI Dates column, which is populating the TI Expiry column (Column K) and those date should have given me an equal split of the four colour states but it was behaving strangely. I want the colour to be based off the TI Expiry date only, should I still be using N5 in the formulas you listed?
 
Upvote 0
No, you'll need to change the $N5 to $K5.
Also if you select manage Rules the rules should be in this order (top to bottom)
=$N5>TODAY()
=EDATE($N5,1)>TODAY()
=EDATE($N5,3)>TODAY()
=EDATE($N5,12)>TODAY()
 
Upvote 0
to answer your second question first, you almost got it with the setup in Col K and N.

instead of =date(year(j5)+1,month(j5),day(j5), you can substitute the +1 to +I5, i.e.

=date(year(j5)+I5,month(j5),day(j5)

similar for Col N

back to your first question excel store the dates in serial nos.

basically your are comparing 2 dates (numbers), e.g. K5 and L5

so, you can construct your formula like this

Code:
=if(K5 < today(),"overdue",if(K5 < today()+1months,"less than 1 month",if(K5 < today()+3months,"1-3 months","3-12 months")))

Thank you for this, this definitely sounds like what I am trying to achieve but for some reason I get an error message in Excel when I try to use the formula you listed for the four Status states. I am using Excel 365, it just tells me there is a problem with it and offers no suggestions.

I did however use the formula you provided for setting a frequency modifier but I changed it a little to =DATE(YEAR(J5),MONTH(J5)+I5,DAY(J5)) since that seems like it will let me put a 6 or a 12 in the frequency column, I moved the +I5 from year to month in this instance but it's very possible I was incorrect in doing so? Should I leave it as the year and use a 1 and .5 in the frequency column or am I just completely misunderstanding?

Thank you everyone for helping me out with this.
 
Upvote 0
No, you'll need to change the $N5 to $K5.
Also if you select manage Rules the rules should be in this order (top to bottom)
=$N5>TODAY()
=EDATE($N5,1)>TODAY()
=EDATE($N5,3)>TODAY()
=EDATE($N5,12)>TODAY()

This is what I am getting at the moment, unless I am missing something obvious (very possible) I think I should be getting an even split of the four colours unless I have put the sample dates in wrong.

fCsiJs.jpg
 
Upvote 0
Think I misunderstood. try changing the Edate formulas like
=EDATE(TODAY(),1)>$K5
and the other formula to
=$K5<TODAY()
 
Upvote 0
Thank you for this, this definitely sounds like what I am trying to achieve but for some reason I get an error message in Excel when I try to use the formula you listed for the four Status states. I am using Excel 365, it just tells me there is a problem with it and offers no suggestions.

I did however use the formula you provided for setting a frequency modifier but I changed it a little to =DATE(YEAR(J5),MONTH(J5)+I5,DAY(J5)) since that seems like it will let me put a 6 or a 12 in the frequency column, I moved the +I5 from year to month in this instance but it's very possible I was incorrect in doing so? Should I leave it as the year and use a 1 and .5 in the frequency column or am I just completely misunderstanding?

Thank you everyone for helping me out with this.

sorry, just been lazy.

the today()+1month etc should read DATE(YEAR(TODAY()),MONTH(TODAY())+1,DAY(TODAY()))

so the full formula in L5 should read

Code:
=IF(ISBLANK(K5),"",IF(K5 < TODAY(),"expired",IF(K5 < (DATE(YEAR(TODAY()),MONTH(TODAY())+1,DAY(TODAY()))),"less than 1 month",IF(K5 < DATE(YEAR(TODAY()),MONTH(TODAY())+3,DAY(TODAY())),"1-3 months","3-12 months"))))

regarding to add year() or month() that shouldn't be a problem as long as they are consistent
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

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