Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 774
- Office Version
- 365
- 2019
- Platform
- Windows
Greetings, I have a Macro which works great, but I need to add the letters "S" and "L". I'm pretty sure it will require an array. Looked for possible example and could not come accross one.
The current macro works greaat moving the A, but I need it to move an S and L too if found in Column R. These letters will be by themselves in Column R.
Thank you,
The current macro works greaat moving the A, but I need it to move an S and L too if found in Column R. These letters will be by themselves in Column R.
VBA Code:
Public Sub MoveLetters()
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In Range("R1:R" & Cells(Rows.Count, "R").End(xlUp).Row)
If InStr(cell.Text, "A") > 0 Then
cell.Offset(0, 1) = cell.Text
cell.ClearContents
End If
Next cell
Application.ScreenUpdating = True
End Sub
Thank you,