Adding to a group of text.

C

ChrisB

I have about 5000 words in columns, I want to add a IMG extension on
these columns, cant his be achieved? for example:

1 WORD
2 PLAY
3 GAME


I would lke to add .JPG on the end of each of those words, all the way
down for 5,000 products, can this be done, and if so, how?

thanks in advance
 
D

Dave O

In an adjacent column, enter the formula
=A1&".jpg"
where A1 contains WORD, etc. You can then copy the formulas and paste
them back over themselves as text, if you need/want to.
 
C

ChrisB

all my data in those columns are different...if I were to ad
WORD&".JPG" , IT would only change "WORD" to "WORD.JPG" in that cell. I
need to be able to change all data in this column to GIF.
 
C

ChrisB

macro worked great!! thanks



Here's a macro solution...........

Sub ConcatenateMeJPG()
Dim lastrow As Long, r As Long
Dim num1 As String
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For r = lastrow To 1 Step -1
If Cells(r, "A") <> "" Then
Cells(r, "A").Select
num1 = Selection.Value
End If
With ActiveCell
.Value = num1 & ".jpg"
End With
Next r
End Sub

Vaya con Dios,
Chuck, CABGx3
 
D

David Biddulph

So copy it down the column. If you want GIF instead of JPG, change the
formula accordingly.
 
Top