Set Character Lengths

C

carlos

I have a column of data that has data like so:

5
050
75
0007


I am trying to convert these into:

005
050
075
007

Thank you in advance.
 
F

Frank Kabel

Hi Carlos
one way
=TEXT(A1,"000")
copy down (if column A stores your data)

HTH
Frank
 
N

Norman Harker

Hi Carlos!

Depends upon if you want them as numbers or text. At present it looks
like they may be text.

Keeping as text you need a helper column

=TEXT(A1,"000")

Once you have your data as you want it you can use:
Copy
Edit > Paste Special > Values > OK
Then remove the original data

Converting to numbers:

Copy a blank cell
Select the range
Edit > Paste Special > Add
Format > Cells > Custom
000
OK

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 

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