I am working on a macro and I have one step to complete. I need the macro to go to sheet2 for example.
Look at Column H if equal to or greater than Column M (Both are dates and values will change daily)
If the statement is true I need it to go back to Column J of the same row and enter a 0 (Zero) for the value.
Sounds simple but I can not seem to figure it out. What I have is below but it is not working for the life of me. I need to be able to do this in VBA, the code snipet needs to be dynamic to flex as the number of rows changes daily can be 5 rows or 500+ rows it needs to loop through.
Any ideas on how I can do this the easiest way?
Firstrow = .UsedRange.Cells(1).Row
LastR = .UsedRange.Rows(.UsedRange.Rows.Count).Row
For Lrow = LastR To Firstrow Step -1
With .Cells(Lrow, "A")
If Not IsError(.Value) Then
If Lrow > 1 Then
If .Cells.Offset(0, 8).Value = Cells.Offset(0, 13).Value Then