Highlighting rows by date
Solved/Closed
bryanfarley
Posts
3
Registration date
Wednesday September 8, 2010
Status
Member
Last seen
September 10, 2010
-
Sep 8, 2010 at 02:52 PM
bryanfarley Posts 3 Registration date Wednesday September 8, 2010 Status Member Last seen September 10, 2010 - Sep 10, 2010 at 10:13 AM
bryanfarley Posts 3 Registration date Wednesday September 8, 2010 Status Member Last seen September 10, 2010 - Sep 10, 2010 at 10:13 AM
Related:
- Highlighting rows by date
- How to delete rows and columns in word - Guide
- Excel insert multiple rows - Guide
- Repeat rows in excel - Guide
- Google docs not highlighting spelling errors - Guide
- How to insert specific number of rows at fixed intervals in excel - Excel Forum
2 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Sep 9, 2010 at 09:23 PM
Sep 9, 2010 at 09:23 PM
in the first message you talked about only H2 and now it is I3 to I263
I suppose I3 to I263 is correct where the dates are parked.
in this case open vb editor, click control+R. in the project window go to your file and right click "thisworkbook" and park this event code
taking into account basic colors no. 6 is yellow and 3 is red.
I suppose I3 to I263 is correct where the dates are parked.
in this case open vb editor, click control+R. in the project window go to your file and right click "thisworkbook" and park this event code
Private Sub Workbook_Open() Dim r As Range, c As Range Worksheets("sheet1").Activate ActiveSheet.Cells.Interior.ColorIndex = xlNone Set r = Range("I3:I263") For Each c In r If c > CDate(Date) And c <= CDate(Date + 30) Then c.EntireRow.Cells.Interior.ColorIndex = 6 ElseIf c > Date + 30 Then c.EntireRow.Cells.Interior.ColorIndex = 3 End If Next c End Sub
taking into account basic colors no. 6 is yellow and 3 is red.
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Sep 9, 2010 at 06:31 AM
Sep 9, 2010 at 06:31 AM
open vb editor (alt+F11). hit control+R. in the project go to your file name and right click "thisworkbook" and click "view code". In the resulting window copy tis event code
whenever you open the file this event code will be executed.
Private Sub Workbook_Open() Range("H2").EntireRow.Cells.Interior.ColorIndex = xlNone If Range("H2") > CDate(Date) And Range("H2") <= CDate(Date) + 30 Then Range("H2").EntireRow.Cells.Interior.ColorIndex = 6 ElseIf Range("H2") > Date + 30 Then Range("H2").EntireRow.Cells.Interior.ColorIndex = 3 End If End Sub
whenever you open the file this event code will be executed.
bryanfarley
Posts
3
Registration date
Wednesday September 8, 2010
Status
Member
Last seen
September 10, 2010
Sep 9, 2010 at 10:31 AM
Sep 9, 2010 at 10:31 AM
OK I cannot seem to get this to work, the range needed is I3 thru I 263 (which I think would be "I3:I263" correct?) and the colors needed are red (24?) for the passed date and yellow(35?) for the month away date. While working on this even using it just the way you have here everything stays clear, I might be just missing a simple step though.
Sep 10, 2010 at 10:13 AM