PC Review


Reply
Thread Tools Rate Thread

How to copy a number into a text cell, keeping leading zeros?

 
 
=?Utf-8?B?QmFzaGVyIEJhdGVz?=
Guest
Posts: n/a
 
      14th Apr 2006
In order to standardise an index reference for a LOOKUP table, I need to
CONCATENATE cells from three columns, which could be (typically) as follows:-
B, 010, 030 or even A, 000, 040. This would give a concatenation of
B010030, etc..

The data has been standardised into this form to allow sorting within a
reference table and I then need to extract cells within that table for use in
my spreadsheet, using the LOOKUP functions.
This works fine if I input '000' as text but if I try to convert a 3-digit
numerical cell to text the leading zeros are dropped, resulting in B1030 or
A040, using the above examples.

Does anybody have a workaround for this problem?
 
Reply With Quote
 
 
 
 
Andy Pope
Guest
Posts: n/a
 
      15th Apr 2006
Hi,

You could use the TEXT() function to maintain leading zeros.
=TEXT(6,"000")
would give you 006

Cheers
Andy

Basher Bates wrote:
> In order to standardise an index reference for a LOOKUP table, I need to
> CONCATENATE cells from three columns, which could be (typically) as follows:-
> B, 010, 030 or even A, 000, 040. This would give a concatenation of
> B010030, etc..
>
> The data has been standardised into this form to allow sorting within a
> reference table and I then need to extract cells within that table for use in
> my spreadsheet, using the LOOKUP functions.
> This works fine if I input '000' as text but if I try to convert a 3-digit
> numerical cell to text the leading zeros are dropped, resulting in B1030 or
> A040, using the above examples.
>
> Does anybody have a workaround for this problem?


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
 
Reply With Quote
 
cityboyjerry
Guest
Posts: n/a
 
      23rd Feb 2008
just testing how to reply.
--
cityboyjerry


"Basher Bates" wrote:

> In order to standardise an index reference for a LOOKUP table, I need to
> CONCATENATE cells from three columns, which could be (typically) as follows:-
> B, 010, 030 or even A, 000, 040. This would give a concatenation of
> B010030, etc..
>
> The data has been standardised into this form to allow sorting within a
> reference table and I then need to extract cells within that table for use in
> my spreadsheet, using the LOOKUP functions.
> This works fine if I input '000' as text but if I try to convert a 3-digit
> numerical cell to text the leading zeros are dropped, resulting in B1030 or
> A040, using the above examples.
>
> Does anybody have a workaround for this problem?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
add text to number field without losing leading zeros Halfpint40601 Microsoft Access 3 28th Jul 2009 07:06 PM
Exporting Text with a variable Number of Leading Zeros =?Utf-8?B?U3RlcGhlbg==?= Microsoft Access 3 27th Feb 2007 07:45 PM
How do I make a number have leading zeros to fill width of cell? =?Utf-8?B?TWF4X1JlYm8x?= Microsoft Excel Misc 4 14th Oct 2005 05:31 PM
HELP! How to copy cell with leading zeros &/or fixed length ?? tmb Microsoft Excel Discussion 2 22nd Mar 2005 03:58 PM
Keeping leading zeros when using Text-to-Columns Ember Microsoft Excel Discussion 2 5th Apr 2004 05:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:28 AM.