Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-05-2018, 05:42 PM
kevinbradley57 kevinbradley57 is offline Change font color if date in column F is prior to today's date. Windows 7 64bit Change font color if date in column F is prior to today's date. Office 2010 64bit
Advanced Beginner
Change font color if date in column F is prior to today's date.
 
Join Date: Jul 2017
Posts: 84
kevinbradley57 is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 12-05-2018, 07:35 PM
NoSparks NoSparks is offline Change font color if date in column F is prior to today's date. Windows 7 64bit Change font color if date in column F is prior to today's date. Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

have you tried changing the 11 to a 6 or F in quotes ("F") ?
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change font color if date in column F is prior to today's date. 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
Change font color if date in column F is prior to today's date. Imported message date change to today's date promark Outlook 1 12-23-2005 07:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft