Hi there,
I'm trying to create a macro in VBA to search through large amounts of data and change the wording depending on the condition.
I want to search column J for "SHIP" and if so, change column A to "TRANSPORT".
I've been fiddling with the following but can't get it working.
Can anyone help?
Dim x As Integer
Dim i As Integer
x = Range("J" & Rows.Count).End(xlUp).Row
For i = 1 To x
If Range("J" & i).Value = "SHIPPER" Then
Range("A" & i).Value = "TRANSPORT"
End If
Next i
I'm trying to create a macro in VBA to search through large amounts of data and change the wording depending on the condition.
I want to search column J for "SHIP" and if so, change column A to "TRANSPORT".
I've been fiddling with the following but can't get it working.
Can anyone help?
Dim x As Integer
Dim i As Integer
x = Range("J" & Rows.Count).End(xlUp).Row
For i = 1 To x
If Range("J" & i).Value = "SHIPPER" Then
Range("A" & i).Value = "TRANSPORT"
End If
Next i