![]() |
colouring cells that are between two dates
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. |
colouring cells that are between two dates
If ((cell.Value = Range("B9").Value) And (cell.Value <
Range("B10").Value)) And (IsDate(cell.Value)) Then cell.Interior.ColorIndex = 4 -- Regards, Tom Ogilvy "Ian" wrote in message ... 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. |
colouring cells that are between two dates
On Tue, 6 Sep 2005 15:32:47 -0400, "Tom Ogilvy"
wrote: 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, |
All times are GMT +1. The time now is 06:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com