How do I append same text to all the cells in a column at once?

A

Abhijit Bamishte

There are 100 rows in my excel sheet. I want to appent same word (".xls") to
all the cell data in a perticular column at once instance. Is there any
formula/function for this? Otherwise I have to edit the data in every cell in
that column for all 100 rows and append the word.
 
T

T. Valko

Here's a simple macro:

Sub AddString()

Dim cell As Range
For Each cell In Selection
If cell.Value <> "" Then
cell.Value = cell.Value & ".xls"
Else: cell.Value = cell.Value
End If

Next cell

End Sub

Place it in a GENERAL module.

Select the range of cells and run the macro.

Biff
 
M

Martin Fishlock

If you don't want the VBA route you can also copy pastespecial append values

or in another column =a1&".xls" and then copy and paste special values.
 
J

joytickle

Another way to append the ".xls" is just customize the format of the
data into G/General"xls".

"Abhijit Bamishte дµÀ£º
"
 
T

T. Valko

you can also copy pastespecial append values

My version of Excel (2002) doesn't have a paste special append option. That
would be very useful!

Biff
 
Top