Don’t have an account yet? Register yourself now and be a part of our community!
Please help me on below code. When I run this code I haven't get any error, but at the same time not getting any result too.
'If date in coloum C is less than today and cell in coloum E is blank (in the same row), then fill that blank cell with "my text" in coloum E.
Dim rng As Range
Dim sh As Worksheet
Dim lastrow As Long
lastrow = Range("C" & Rows.Count).End(xlUp).Row
Set sh = ThisWorkbook.Worksheets("Entry Page")
'Set the range in column C you want to loop through
Set rng = sh.Range("C2" & lastrow)
With Worksheets("Entry Page")
For Each Cell In rng
'test if cell is empty
If Cell.Value < Date And Cell.Offset(0, 2) = "" Then
'write to adjacent cell
Cell.Offset(0, 2).Value = "My Text"
lost access to my old account how do i get access ashu1990
Hello My Dear