
Originally Posted by
Pete_UK
You can have a different colour for the start date and the end date of the hire period. To start with, you need to set up two named ranges in the Hire sheet. I've used:
Hire_start, referring to =Hire!$A$6:$A$36, and:
Hire_end, referring to =Hire!$F$6:$F$36
Then in the Calendar sheet you need to select all the cells with the dates in them (i.e. =$B$6:$H$6,$B$8:$H$8,$B$10:$H$10,$B$12:$H$12,$B$14:$H$14,$B$4:$H$4) and then you can apply the CF in one operation. With those cells selected (and with B4 as the Active cell), click on Conditional Formatting | New Rule | Use a formula... , then enter this formula in the dialogue box which pops up:
=ISNUMBER(MATCH(B4,Hire_start,0))
Click on the Format button | Fill tab and choose your colour for the start dates (e.g. yellow), then you can OK your way out. With the cells still selected, repeat and use this formula:
=ISNUMBER(MATCH(B4,Hire_end,0))
Format and Fill again, then choose your colour for the end dates (e.g. blue). When you exit the dialogue box Excel will automatically adjust the cell reference to suit all the other cells that had been selected.
Hope this helps.
Pete
Bookmarks