Hello, I'm a beginner in VBA and I trying to automate the flowing task:
I have a WS2 that represents my Checklist. On that Checklist I have Dates in Column P. The Dates tell us when check items were added and by doing that we can simply skip old one that are older than a specific date. I would like to have a Revision Date in Range("C6"), so that VBA can go thru my entire WB and if it finds in Column P a date that is older than my Revison Date in C6, it should Highlight/Grey out the Column(A:P) on that specific row.
Since our checklist is expanding, i think it will have to loop thru the entire WB. I know how to set it up in Conditional Formatting but is will not support it, if I add a row somewhere..
This is just a part of test code I put together and I'm missing the main part of it.
I appreciate any help!
I have a WS2 that represents my Checklist. On that Checklist I have Dates in Column P. The Dates tell us when check items were added and by doing that we can simply skip old one that are older than a specific date. I would like to have a Revision Date in Range("C6"), so that VBA can go thru my entire WB and if it finds in Column P a date that is older than my Revison Date in C6, it should Highlight/Grey out the Column(A:P) on that specific row.
Since our checklist is expanding, i think it will have to loop thru the entire WB. I know how to set it up in Conditional Formatting but is will not support it, if I add a row somewhere..
This is just a part of test code I put together and I'm missing the main part of it.
Code:
Dim row As Long
Dim lastrow As Long
lastrow = "All the day down"
col1 = 16
For row = 1 To lastrow
If Cells(row, col1).Value < WS2.Range("C6") Then "Highlight Colum(A:P) in that Row".Interior.Color = RGB(242, 242, 242)
End If
Next row
I appreciate any help!