Hello,
I have written a macro that works as I want in the worksheet it was written in. But, when I try to run the macro from the 2nd worksheet, the macro just runs in the original.
I think I must be missing an ActiveWorksheet, but I can't find where to insert it.
Thanks.
I have written a macro that works as I want in the worksheet it was written in. But, when I try to run the macro from the 2nd worksheet, the macro just runs in the original.
I think I must be missing an ActiveWorksheet, but I can't find where to insert it.
Thanks.
Code:
Sub SRRemoval()
Dim LR As Long, i As Long
LR = Range("D" & Rows.Count).End(xlUp).Row
For i = 2 To LR
With Range("D" & i)
If Mid(.Value, 4, 1) = "/" Then
.Value = Right(.Value, Len(.Value) - 6)
End If
End With
Next i
End Sub