If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Conditional formatting of date
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(A1TODAY(),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(A1TODAY(),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. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Date Range and Average F/X Rate | David | General Discussion | 0 | June 23rd, 2005 02:26 PM |
conditional formatting in form slows down calculations | Susan | Using Forms | 5 | June 13th, 2005 11:24 AM |
Conditional Formatting Anomaly | Rutgers_Excels | General Discussion | 1 | November 1st, 2004 08:43 PM |
Conditional Formatting Questions | Andy B | Worksheet Functions | 1 | May 12th, 2004 02:48 PM |
Freezing Conditional Formatting | Ashish Chamaria | Worksheet Functions | 3 | December 19th, 2003 10:54 AM |