Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Macro for colouring cells | Excel Discussion (Misc queries) | |||
Automatic colouring of cells | Excel Discussion (Misc queries) | |||
Automatic colouring of cells | Excel Worksheet Functions | |||
How to apply colouring as in Cells associated with Forumla | Excel Programming | |||
Colouring cells | Excel Programming |