Add Charaters to the beginning of a column of numbers.

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

Guest

I have a spreadsheet with about 3500 rows of text.
The first column is numbers. I'd like to add a prefix "DEL" to each number
in the entire column.
 
Liz,

here's one suggestion

Sub test()

Dim c As Range
Application.Calculation = xlCalculationManual
For Each c In Application.Intersect(ActiveSheet.UsedRange,
ActiveSheet.Range("A:A"))
With c
.Value = "DEL " & .Text
End With
Next c
Application.Calculation = xlCalculationAutomatic

End Sub
 
Liz,

Insert a new column before your first column and enter the formula
="DEL"&B1 in cell A1. Copy this down for all the rows. Then select the
entire range and choose Edit/Copy. Now select the original range in
column B and choose Edit/Paste Special, select 'Values' and click OK.
Now you can delete column A again.

DQ
 
I have a spreadsheet with about 3500 rows of text.
The first column is numbers. I'd like to add a prefix "DEL" to each number
in the entire column.

Do you want it to just "look" that way; or do you need to actually turn it into
a string?

If it is just an appearance issue, then you could use formatting:

Select the cells.

Format/Cells/Number/Custom Type: "DEL"General


--ron
 

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