Highlighti Row/ colour fill through VB
Solved/Closed
DevRatan
Posts
2
Registration date
Thursday May 23, 2013
Status
Member
Last seen
May 28, 2013
-
May 23, 2013 at 05:35 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 - May 28, 2013 at 09:14 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 - May 28, 2013 at 09:14 AM
Related:
- Highlighti Row/ colour fill through VB
- Crimping colour code - Guide
- Vb editor download - Download - IDE
- How to delete a row in word - Guide
- Saints row download - Download - Action and adventure
- Colour code download - Download - Education
1 reply
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 16, 2023
547
May 27, 2013 at 10:48 AM
May 27, 2013 at 10:48 AM
Hi DevRatan,
When the expiry date is 27-5 and today is 27-5, has it been expired now or tomorrow?
Because of this question you might have to change the numbers (the ones behind Date) in the code.
Paste the code under ThisWorkbook after hitting Alt+F11.
Best regards,
Trowa
When the expiry date is 27-5 and today is 27-5, has it been expired now or tomorrow?
Because of this question you might have to change the numbers (the ones behind Date) in the code.
Private Sub Workbook_Open() Dim lRow As Integer, MySh As String MySh = "Blad1" 'Change sheetname to match yours lRow = Sheets(MySh).Range("D" & Rows.Count).End(xlUp).Row For Each cell In Range("D2:D" & lRow) If cell.Value - Date <= 0 Then cell.EntireRow.Interior.ColorIndex = 3 If cell.Value - Date > 0 Then cell.EntireRow.Interior.ColorIndex = 45 If cell.Value - Date > 7 Then cell.EntireRow.Interior.ColorIndex = 6 Next cell End Sub
Paste the code under ThisWorkbook after hitting Alt+F11.
Best regards,
Trowa
May 28, 2013 at 05:19 AM
May 28, 2013 at 09:14 AM