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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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.
 
Another way to append the ".xls" is just customize the format of the
data into G/General"xls".

"Abhijit Bamishte дµÀ£º
"
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top