colouring cells that are between two dates

  • Thread starter Thread starter Ian
  • Start date Start date
I

Ian

I have the following code and it works fine.

If ((cell.Value >= DateValue("01/11/05")) And (cell.Value <
DateValue("01/12/05"))) And (IsDate(cell.Value)) Then
cell.Interior.ColorIndex = 4

The date values are fixed in the code but I want to pick the date
values from two cells on the sheet. I cannot seem to make it work.
Anyone haave aany ideaas?

Cheers,

Ian.
 
If ((cell.Value >= Range("B9").Value) And (cell.Value <
Range("B10").Value)) And (IsDate(cell.Value)) Then
cell.Interior.ColorIndex = 4
 
If ((cell.Value >= Range("B9").Value) And (cell.Value <
Range("B10").Value)) And (IsDate(cell.Value)) Then
cell.Interior.ColorIndex = 4


Thanks Tom, as ever you have the solution. I nearly got there
but but got confused with using the datevalue.

Thanks again,

Ian,
 
Back
Top