Paste text- help

A

Anand vijay

Hi..

I want to know that if in cell A1 to A20 I have some text and i want to pase
addtional text in the existing text in all the cells from A1 to A20 . How do
I do it in one command.
 
F

FSt1

hi,
I don't think you can. but you can use a formula.
=CONCATENATE(A1,B1) Copy down.
adjust to your data.
to change formula to hard data, edit>pastespecial>values (at A1). delete
other data.

Regards
FSt1
 
G

Gord Dibben

You say "in the text". Do you mean between two strings in the cells or just
left or right side.

No one command possible unless you use a macro.

Sub Add_Text_Left()
Dim cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo endit
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
moretext = InputBox("Enter your Text")
For Each cell In thisrng
cell.Value = moretext & cell.Value
' to add to right side
'cell.Value = cell.Value & moretext
Next
Exit Sub
endit:
MsgBox "only formulas in range"
End Sub

For in between more complex code would be required depending upon your needs.


Gord Dibben MS Excel MVP
 
Top