Hello
I am trying to compare values in two columns and return the value in another. What I have so far works however, in column O there is already the value "Trainee" which means its returning the value "Trainee Manual" even when it does not match Babcock - Weekly. Sure I need an Or in there but not very good at them.
Sub Test()
Dim LastRow As Long
Dim i As Long
LastRow = Range("P" & Rows.Count).End(xlUp).Row
For i = 2 To LastRow
'If i = 615 Then
'MsgBox ("Here")
'End If
If Range("P" & i).Value = "Babcock - Weekly" Then
If Range("O" & i).Value = "Apprentice" Then
Range("N" & i).Value = "Trainee - Manual"
End if
End If
If Range("O" & i).Value = "Trainee" Then
Range("N" & i).Value = "Trainee - Manual"
End If
Next i
End Sub
Thanks
Ross
Bookmarks