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
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
Hi
With number p.e. in A1:
=TEXT(A1,"00000")
--
When sending mail, use address arvil<at>tarkon.ee
Arvi Laanemets
"Natalie" <[email protected]> wrote in message
news:[email protected]...
> 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
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
if 51126 is ib a1 in B1 type
="0"&A1
copy this formula down
Natalie <[email protected]> wrote in message
news:[email protected]...
> 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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks