Struggling with conditional formatting formula for a date calculation

matthewoaks

New Member
Joined
Jan 31, 2014
Messages
30
Hi All,
There is probably a really simple formula for this but can't get my head around it.
I have a spreadsheet which I need to do bit of conditional formatting on.
I have a basic table, ships names along the top, types of inspection along the side
In the boxes are the dates when the inspections are due to happen.
What happens is we have a pre-inspection approx 4 weeks prior to the SIRE inspection to make sure everything is OK and if any items need doing before the actual inspection these can be closed out. Simple!
What I want is some conditional formatting in the Date of pre-inspection to highlight the cell in yellow when the inspection is coming up. This should be highlighted 4 weeks prior to the SIRE date. For example If we look at Whitonia...If todays date was the 19/07/16 then the pre-inspection date would be yellow, all the way up until the SIRE inspection date. Hope this makes sense.

WhitoniaWhitchampion
Date of next SIRE inspection16/08/1627/04/16
Date of pre-inspection19/07/1630/03/16

<tbody>
</tbody>
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi,

Use the E2 formula in my sample as your Conditional Formatting formula:


Excel 2010
ABCDE
1WhitoniaWhitchampionCF Formula
2Date of next SIRE inspection16/08/1627/04/16FALSE
3Date of pre-inspection19/07/1630/03/16
Sheet1
Cell Formulas
RangeFormula
E2=AND(B3=TODAY(),B3+28>=B2)
 
Upvote 0
Hi,

Use the E2 formula in my sample as your Conditional Formatting formula:

Excel 2010
ABCDE
1WhitoniaWhitchampionCF Formula
2Date of next SIRE inspection16/08/1627/04/16FALSE
3Date of pre-inspection19/07/1630/03/16

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
E2=AND(B3=TODAY(),B3+28>=B2)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
hi and thanks for the assistance. I've just inputted this formula and tried it, it works great when the date in B3 is exactly 28 days before B2, however is there a way for this cell to stay yellow 28 days before and all the way up to the SIRE date until the SIRE date has been changed.
Thanks again for the help
 
Upvote 0
Oops, Sorry, misread your post, try this:

Use the E2 formula in my sample as your Conditional Formatting formula:


Excel 2010
ABCDE
1WhitoniaWhitchampionCF Formula
2Date of next SIRE inspection16/08/1627/04/16FALSE
3Date of pre-inspection19/07/1630/03/16
Sheet1
Cell Formulas
RangeFormula
E2=AND(B3<=TODAY(),B3+28>=B2)
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

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