Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to add one digit "0" in the front of a number


Hi everyone,

I have a problem in my excel. I'm trying to add a digit "0" in front o
every number in one column. For example: if the number is 1234567, the
I want it to become 8 digit number, that is 01234567. So, in conclusio
I need one extra digit 0 in front of every number. Is there any way t
do that?

Thank you very much

--
wlion
-----------------------------------------------------------------------
wliong's Profile: http://www.excelforum.com/member.php...fo&userid=2834
View this thread: http://www.excelforum.com/showthread.php?threadid=48819

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default How to add one digit "0" in the front of a number

Try:

="'0" & A1 and this is not a typo. Its an apostrophe followed by a double
quote
--
Gary''s Student


"wliong" wrote:


Hi everyone,

I have a problem in my excel. I'm trying to add a digit "0" in front of
every number in one column. For example: if the number is 1234567, then
I want it to become 8 digit number, that is 01234567. So, in conclusion
I need one extra digit 0 in front of every number. Is there any way to
do that?

Thank you very much.


--
wliong
------------------------------------------------------------------------
wliong's Profile: http://www.excelforum.com/member.php...o&userid=28343
View this thread: http://www.excelforum.com/showthread...hreadid=488198


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to add one digit "0" in the front of a number


Both method works.
Thanks again Gary.


--
wliong
------------------------------------------------------------------------
wliong's Profile: http://www.excelforum.com/member.php...o&userid=28343
View this thread: http://www.excelforum.com/showthread...hreadid=488198

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to add one digit "0" in the front of a number


There are a few ways to get what you want. Here are 3:

If there are always the same number of digits (like in an Account
Number with 8 digits):

FormatCellsNumber tab
Category: Custom
Type: 00000000
(1234567 would display as 01234567)

or

FormatCellsNumber tab
Category: TEXT
(Since the value would actually be TEXT, you'd have to enter 01234567)


Alternatively, you could use a formula in another cell:

B1: =TEXT(A1,"00000000")
If A1: 1234567 B1 would return the text string "01234567"
Do any of those help?

Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=488198

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
Difficulty "countif"-ing number of "L1" or "L2" on an autofiltered pmdoherty Excel Worksheet Functions 4 February 6th 09 11:23 AM
How do I keep a 17 digit number from ending in "0" in excel? creel28270 Excel Discussion (Misc queries) 6 June 18th 08 04:12 PM
displays "####" when 1-digit number typed meanmommy Excel Discussion (Misc queries) 2 April 12th 08 06:40 PM
find/replace "cr" from end of number to "-" in front of number Dave o Excel Discussion (Misc queries) 2 August 22nd 06 09:24 PM
LOOP BETWEEN "FRONT" AND "END" SHEETS? ewan7279 Excel Programming 7 March 17th 05 03:11 PM


All times are GMT +1. The time now is 09:30 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"