I am a newbie to macros. I've tweaked a couple that others have written, but haven't composed my own.
I have a long column of numbers; 1, 2, 3, . . .
I want to add the string "Gage_" in front of each number in the column so that I will have; Gage_1, Gage_2, Gage_3, . . .
I'm looking for a way to add this quickly in Excel 2007.
Thanks for the help.
Phil
Last edited by oghk2000@yahoo.com; 07-11-2011 at 12:53 PM.
If your data are in A1 and down, try this:
Sub x() Dim r As Range, v, i As Long, s As String For Each r In Range("A1", Range("A" & Rows.Count).End(xlUp)) v = Split(r, ",") For i = LBound(v) To UBound(v) s = s & ", " & "Gage_" & v(i) Next i r = Mid(s, 3) s = "" Next r End Sub
Yes! That is exactly what I needed. Thank you very much.
Phil
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks