Hi
I have the following macro and wondered what ive done wrong as its not moving data when there is data with word "fare" in column E.
Sub MoveData()
Dim ws As Worksheet
Dim lr As Long, i As Long
Application.ScreenUpdating = False
Set ws = Worksheets("Sheet1") 'Data Sheet
lr = ws.Cells(Rows.Count, "E").End(xlUp).Row
For i = 1 To lr
If UCase(ws.Cells(i, "E").Value) = "Fare" Then
ws.Range("E" & i & ":AS" & i).Cut ws.Range("G" & i)
End If
Next i
Application.ScreenUpdating = True
End Sub
Any ideas?
I have the following macro and wondered what ive done wrong as its not moving data when there is data with word "fare" in column E.
Sub MoveData()
Dim ws As Worksheet
Dim lr As Long, i As Long
Application.ScreenUpdating = False
Set ws = Worksheets("Sheet1") 'Data Sheet
lr = ws.Cells(Rows.Count, "E").End(xlUp).Row
For i = 1 To lr
If UCase(ws.Cells(i, "E").Value) = "Fare" Then
ws.Range("E" & i & ":AS" & i).Cut ws.Range("G" & i)
End If
Next i
Application.ScreenUpdating = True
End Sub
Any ideas?