Changing a cell Colour

petebrewster

New Member
Joined
Feb 28, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hoping someone can help, ive been bashing my head for an hour and cant work this out.

I'm trying to create a rule / situation where the color of a cell changes when a certain period of time / date passes.

I have 3 columns, first column will have the date of when the inspection was last carried out, the next column will be when the inspection is next due. Generally i have inspections that are a year apart, although I do have some that require re-inspection after 6 months, 14 months 5 years, but i'm guessing the rule is the same.

I would like the 'due date' cell to change color, twice, the first to yellow, when we are 1 month away from the reinspection date, the second color change will be to red if the reinspection date passes, but the date remains visible in the cell.

Any assistance, or pointing to an idiots guide would be great.

Thanks in advance, Pete
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Conditional Formatting. I used 30 days for a month.
MrExcelPlayground7.xlsx
B
13/15/2022
22/15/2022
34/15/2022
Sheet3
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B1:B3Expression=TODAY()-B1>0textNO
B1:B3Expression=TODAY()-B1+30>0textNO
 
Upvote 0
You can use conditional formatting. Assuming the reinspection dates are in column B, select the date range in column B to highlight it. Then use this formula in the conditional formatting for yellow:
=AND(B2>=TODAY()-30,B2<=TODAY())

and this formula for red:
=B2>TODAY()
 
Upvote 0
clicking conditional formatting gives me lots of options, ???, sorry, assume i'm completely stupid and talk me through step by step, that would be amazing
 
Upvote 0
Select the date range to highlight it. In the Home menu tab, click on Conditional Formatting...New Rule...Use a formula to determine which cell to format, copy/paste the formula in the box "Format values where...". Then click the "Format" button and select the fill color. Repeat for next colour.
 
Upvote 0
Select the date range to highlight it. In the Home menu tab, click on Conditional Formatting...New Rule...Use a formula to determine which cell to format, copy/paste the formula in the box "Format values where...". Then click the "Format" button and select the fill color. Repeat for next colour.
select date range?, you mean select the cell....,.
 
Upvote 0
All the reinspection dates.
 
Upvote 0
It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (not a picture) of your sheet. Alternately, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).
 
Upvote 0
It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (not a picture) of your sheet. Alternately, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).
ok, here is the link to the file.


The cells may be populated with other formula, i thought i could use it, but its just got me confused.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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