Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I want to compare a date in a cell to the current date. If the current date
is past the date in the specified cell, and the adjacent cell is blank, I want the specified date to display in red. Would someone be so kind as to assist me with this please. |
#2
![]() |
|||
|
|||
![]()
You need conditional formatting.
Select the cell to format, and let's assume that the compare cell is A1 Menu FormatConditional Formatting Change Condition1 to Formula Is Add a formula of =AND(A1<TODAY(),B1="") Click Format Choose the text colour OK OK -- HTH Bob Phillips "cebubum" wrote in message ... I want to compare a date in a cell to the current date. If the current date is past the date in the specified cell, and the adjacent cell is blank, I want the specified date to display in red. Would someone be so kind as to assist me with this please. |
#3
![]() |
|||
|
|||
![]()
the dates are in A1 to A20
in D1 enter =today() then try this sub Public Sub test() Dim cell As Range For Each cell In Range("a1:a20") If cell < Range("d1") Then If cell.Offset(0, 1) = "" Then cell.Font.ColorIndex = 3 Else End If End If Next End Sub cutomise the sub to suit you. each day the color may change. ======================== cebubum wrote in message ... I want to compare a date in a cell to the current date. If the current date is past the date in the specified cell, and the adjacent cell is blank, I want the specified date to display in red. Would someone be so kind as to assist me with this please. |
#4
![]() |
|||
|
|||
![]()
Thank you for responding. I think I can make this work now
"Bob Phillips" wrote: You need conditional formatting. Select the cell to format, and let's assume that the compare cell is A1 Menu FormatConditional Formatting Change Condition1 to Formula Is Add a formula of =AND(A1<TODAY(),B1="") Click Format Choose the text colour OK OK -- HTH Bob Phillips "cebubum" wrote in message ... I want to compare a date in a cell to the current date. If the current date is past the date in the specified cell, and the adjacent cell is blank, I want the specified date to display in red. Would someone be so kind as to assist me with this please. |
#5
![]() |
|||
|
|||
![]()
Thanks a lot. Worked well
"R.VENKATARAMAN" wrote: the dates are in A1 to A20 in D1 enter =today() then try this sub Public Sub test() Dim cell As Range For Each cell In Range("a1:a20") If cell < Range("d1") Then If cell.Offset(0, 1) = "" Then cell.Font.ColorIndex = 3 Else End If End If Next End Sub cutomise the sub to suit you. each day the color may change. ======================== cebubum wrote in message ... I want to compare a date in a cell to the current date. If the current date is past the date in the specified cell, and the adjacent cell is blank, I want the specified date to display in red. Would someone be so kind as to assist me with this please. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional Formatting Based on Date | Excel Discussion (Misc queries) | |||
difficulty with conditional formatting | Excel Discussion (Misc queries) | |||
How do I set a date range for conditional formatting in a macro? | Excel Worksheet Functions | |||
Conditional formatting not available in Excel | Excel Discussion (Misc queries) | |||
Conditional Formatting (Date vs Number) | Excel Discussion (Misc queries) |