Hello I am new to VBA and I have an excel sheet as shown in the image below and I want to run through each row until the last row to remove the characters in front of "/".
The following is my VBA code. However, my code could only work on one cell currently and I am not sure how do I change it to a For Loop to run through all the rows until the last row. Also, there are certain cells that does not contain the "/" and I just want it to be an empty cell. I need some help on how could I work on this? Thank you really appreciate if anyone would be able to assist me with this.
Sub String()
' String
Dim stringOriginal As String
stringOriginal = Range("A2").Value
Dim indexOfThey As Integer
indexOfThey = InStr(1, stringOriginal, "/")
Dim finalString As String
finalString = Right(stringOriginal, Len(stringOriginal) - indexOfThey)
Range("A2").Value = finalString
End Sub