Hi,
A forum contributor gave me this macro which works perfectly. It shows the substring after the last "/" in the string.
This function works for column A. I would like this formula to work for other columns as well. I changed "A2" for "W2" but it doesn't work. How can i adjust this function to work for example for column W?
Sub lssl()
Dim a, i As Long
a = Range("A2", cells(Rows.Count, 1).End(xlUp)).Resize(, 2).Value
For i = 1 To UBound(a)
a(i, 2) = Mid(a(i, 1), InStrRev(a(i, 1), "\") + 1)
Next
[A2].Resize(UBound(a), 2) = a
End Sub
Bookmarks