#1
|
|||
|
|||
Change font color if date in column F is prior to today's date.
I have a spreadsheet in which Column F of every row is a different date. This code only works on the first row after the header. Help? Code:
Sub PastDue() Dim rCell As Range With Sheet1 For Each rCell In .Range("F2", .Cells(.Rows.Count, 11).End(xlUp)).Cells If rCell <> "" And IsDate(rCell) And rCell.Value < Date Then rCell.Font.color = vbRed End If Next rCell End With End Sub Last edited by kevinbradley57; 12-05-2018 at 06:35 PM. Reason: Forgot code |
#2
|
|||
|
|||
have you tried changing the 11 to a 6 or F in quotes ("F") ?
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Selecting a Date in Date Picker and Having it change dates throughout | joshuaran | Word VBA | 2 | 03-14-2018 09:24 PM |
Change a part of date or the number color | Jazzis | Excel | 3 | 10-15-2016 01:49 AM |
How can I make a cell color RED under the Today's date cell? | Learner7 | Excel | 2 | 07-08-2010 12:52 AM |
new appointment date always reverts back to today's date | msills | Outlook | 0 | 08-24-2007 08:57 AM |
Imported message date change to today's date | promark | Outlook | 1 | 12-23-2005 07:21 AM |