I3atnumb3rs
New Member
- Joined
- Nov 2, 2018
- Messages
- 34
Hello,
I'm trying to make it so that if colum B cell is empty to change column P cell to cancelled, but I can't seem to make it work. please help!
Sub ChngProgUnassigned()
Dim Col As Variant
Dim BlankRows As Long
Dim LastRow As Long
Dim r As Long
Dim StartRow As Long
Col = "B"
StartRow = 1
BlankRows = 1
LastRow = Cells(Rows.Count, Col).End(xlUp).Row
With ActiveSheet
For r = LastRow To StartRow + 1 Step -1
If IsEmpty(Cells(r, Col)) = True Then
.Cells(r, Col + 14).Value = "CANCELLED"
End If
Next r
End With
End Sub
I'm trying to make it so that if colum B cell is empty to change column P cell to cancelled, but I can't seem to make it work. please help!
Sub ChngProgUnassigned()
Dim Col As Variant
Dim BlankRows As Long
Dim LastRow As Long
Dim r As Long
Dim StartRow As Long
Col = "B"
StartRow = 1
BlankRows = 1
LastRow = Cells(Rows.Count, Col).End(xlUp).Row
With ActiveSheet
For r = LastRow To StartRow + 1 Step -1
If IsEmpty(Cells(r, Col)) = True Then
.Cells(r, Col + 14).Value = "CANCELLED"
End If
Next r
End With
End Sub