Your technology certification is waiting. Enroll in Cloud Class ®
' What I need is VBA that will go through the whole column
' and if it begins with an A, strip it off, then do the mid function.
' =mid(A2, 2, 5)
Public Sub DeletePrefix()
For Each i In Sheets("sheet1").Range("A:A") ' entire 1st column independent of max rows
If Mid(i.Value, 1, 1) = "A" Then
i.Value = Mid(i.Value, 2, 5) 'NOTE: remove last argument to preserve all but the first character
Open in new window
Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.