update a word as a prefix in a column for all rows.

  • Thread starter Rahul Srivastava
  • Start date
R

Rahul Srivastava

Hi i have an excel spread sheet of around 200 rows, in one of its column i
want to update a word as a prefix to text in all the rows.

Is there any ways (shortcut) i can update the prefix by some formulas or
logical function?
 
G

Gary''s Student

Say we have text in column Y and we want to prefix all the cells with the text:

Rahul

In another column (working) enter:
="Rauhl" & Y1 and copy down

Then copy the working column and paste/special/values back onto column Y
Then clear the working column.
 
G

Gord Dibben

If you want 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
Next
Exit Sub
endit:
MsgBox "only formulas in range"
End Sub


Gord Dibben MS Excel MVP

On Wed, 2 Sep 2009 06:30:02 -0700, Rahul Srivastava <Rahul
 

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

Top