Hi everybody,
I was hoping you could help me with the following problem. Currently I am working on a register system and for that I have a button that if the current date (J9 with =Today function) exceeds the due date of a particular row in Column F that the status in column D changes to "Behind". The problem is that the code changes all statusses to behind in column D, even if a row has no content at all. Is there a possibility to change the code so it only changes the statuses to "behind" if there is something written in for example column A? The code I use is the following:
Thanks in advance!
Inuniform
I was hoping you could help me with the following problem. Currently I am working on a register system and for that I have a button that if the current date (J9 with =Today function) exceeds the due date of a particular row in Column F that the status in column D changes to "Behind". The problem is that the code changes all statusses to behind in column D, even if a row has no content at all. Is there a possibility to change the code so it only changes the statuses to "behind" if there is something written in for example column A? The code I use is the following:
Code:
Sub Button2()
Dim lr As Long, i As Long
lr = Range("F" & Rows.Count).End(xlUp).Row
For i = 13 To 40
If Range("F" & i) < Range("J9") Then
Range("D" & i) = "Behind"
End If
Next i
End Sub
Thanks in advance!
Inuniform