Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Liz Liz is offline
external usenet poster
 
Posts: 133
Default Add Charaters to the beginning of a column of numbers.

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Add Charaters to the beginning of a column of numbers.

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


--
Hope that helps.

Vergel Adriano


"Liz" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
dq dq is offline
external usenet poster
 
Posts: 46
Default Add Charaters to the beginning of a column of numbers.

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Add Charaters to the beginning of a column of numbers.

On Wed, 2 May 2007 09:15:36 -0700, Liz wrote:

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMMING TOTALS BASING ON CHARATERS ENTERED IN CELLS OF ONE COLUMN Lawsim Excel Worksheet Functions 2 May 23rd 11 05:21 PM
How do I add (') at the beginning and end of a series of numbers? Ann Excel Discussion (Misc queries) 1 April 5th 06 03:55 PM
Count equal numbers in beginning of a column FiddlerOnTheRoof Excel Programming 5 January 25th 06 07:08 AM
formatting numbers beginning with zero Louise Excel Worksheet Functions 6 October 14th 05 04:12 PM
How can I display numbers beginning with zero? CSMthePR Excel Discussion (Misc queries) 4 July 19th 05 06:47 PM


All times are GMT +1. The time now is 09:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"