Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Natalie
 
Posts: n/a
Default add characters to beginning of text

Does anyone know how to add characters to the beginning of numbers -

I have a list of numbers

51126
54889
53665

and I want

051126
054889
053665

I can't use the format cells, as I need the numbers to be text??

Thanks
  #2   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

With number p.e. in A1:
=TEXT(A1,"00000")

--
When sending mail, use address arvil<attarkon.ee
Arvi Laanemets


"Natalie" wrote in message
...
Does anyone know how to add characters to the beginning of numbers -

I have a list of numbers

51126
54889
53665

and I want

051126
054889
053665

I can't use the format cells, as I need the numbers to be text??

Thanks



  #3   Report Post  
Peter Rooney
 
Posts: n/a
Default

Natalie,

Select the cells you want tmodify, then run this code:

Sub AddApostropheToRange()
Dim CellToModify As Object
For Each CellToModify In Selection
CellToModify.Formula = "'0" & CellToModify.Formula
Next CellToModify
End Sub

Hope this helps

Pete



"Natalie" wrote:

Does anyone know how to add characters to the beginning of numbers -

I have a list of numbers

51126
54889
53665

and I want

051126
054889
053665

I can't use the format cells, as I need the numbers to be text??

Thanks

  #4   Report Post  
R.VENKATARAMAN
 
Posts: n/a
Default

if 51126 is ib a1 in B1 type
="0"&A1
copy this formula down

Natalie wrote in message
...
Does anyone know how to add characters to the beginning of numbers -

I have a list of numbers

51126
54889
53665

and I want

051126
054889
053665

I can't use the format cells, as I need the numbers to be text??

Thanks



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
Importing text files with mathematical characters The Beckster Excel Discussion (Misc queries) 1 March 2nd 05 12:56 PM
Sort or Filter option? Mcobra41 Excel Worksheet Functions 3 February 23rd 05 07:22 PM
Remove single text characters mawme Excel Discussion (Misc queries) 1 January 27th 05 10:25 PM
How do I get rid of line feed characters in wrapped text? Gladmac Excel Discussion (Misc queries) 3 January 18th 05 06:40 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


All times are GMT +1. The time now is 03:16 PM.

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

About Us

"It's about Microsoft Excel"