PC Review


Reply
Thread Tools Rate Thread

How can I prefill a text field with leading 0s?

 
 
=?Utf-8?B?U3dlZXRldGM=?=
Guest
Posts: n/a
 
      24th Feb 2006
I have a list on Text data
ie 1, 14, 203, etc
I want them all to be 6 charcters long.
ie 000001, 000014, 000203, etc.
I can concatenate but the I would manually need to remove extra 0's Any
suggestions

--
Thanks
ETC
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      24th Feb 2006
Set the format to 000000 (Format>Cells>Custom)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Sweetetc" <(E-Mail Removed)> wrote in message
news:4FE8056D-D357-40AB-8885-(E-Mail Removed)...
> I have a list on Text data
> ie 1, 14, 203, etc
> I want them all to be 6 charcters long.
> ie 000001, 000014, 000203, etc.
> I can concatenate but the I would manually need to remove extra 0's Any
> suggestions
>
> --
> Thanks
> ETC



 
Reply With Quote
 
=?Utf-8?B?RHVrZSBDYXJleQ==?=
Guest
Posts: n/a
 
      24th Feb 2006
If it is for display purposes, you can format (numbers, not text) using a
custom format of "000000"

If you need the values to 6 characters you can use for numeric values:
=text(number, "000000")

For text values:
=rept("0",6-len(text value))&text value


"Sweetetc" wrote:

> I have a list on Text data
> ie 1, 14, 203, etc
> I want them all to be 6 charcters long.
> ie 000001, 000014, 000203, etc.
> I can concatenate but the I would manually need to remove extra 0's Any
> suggestions
>
> --
> Thanks
> ETC

 
Reply With Quote
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      24th Feb 2006
Format > Cells... > Number > Custom and enter 000000
--
Gary's Student


"Sweetetc" wrote:

> I have a list on Text data
> ie 1, 14, 203, etc
> I want them all to be 6 charcters long.
> ie 000001, 000014, 000203, etc.
> I can concatenate but the I would manually need to remove extra 0's Any
> suggestions
>
> --
> Thanks
> ETC

 
Reply With Quote
 
=?Utf-8?B?U3dlZXRldGM=?=
Guest
Posts: n/a
 
      24th Feb 2006
Duke

Thanks the TXT seemed to do the trick. I could not get the REPT to work
correctly
--
Thanks
ETC


"Duke Carey" wrote:

> If it is for display purposes, you can format (numbers, not text) using a
> custom format of "000000"
>
> If you need the values to 6 characters you can use for numeric values:
> =text(number, "000000")
>
> For text values:
> =rept("0",6-len(text value))&text value
>
>
> "Sweetetc" wrote:
>
> > I have a list on Text data
> > ie 1, 14, 203, etc
> > I want them all to be 6 charcters long.
> > ie 000001, 000014, 000203, etc.
> > I can concatenate but the I would manually need to remove extra 0's Any
> > suggestions
> >
> > --
> > Thanks
> > ETC

 
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
leading zeroes in text field ahalford Microsoft Access Macros 1 18th Mar 2008 05:46 AM
Leading zeros in a text field =?Utf-8?B?d25maXNiYQ==?= Microsoft Access 1 3rd May 2006 05:35 PM
How to keep leading zero without changing field to text field? =?Utf-8?B?RGVuaQ==?= Microsoft Excel Misc 1 24th Oct 2005 10:48 PM
converting numbers to text and prefill text field with 0's =?Utf-8?B?SmFuIEJ1Y2tsZXk=?= Microsoft Excel Misc 2 20th Jan 2005 09:03 PM
Remove leading 0's from Text field Bruce Microsoft Access Database Table Design 3 13th May 2004 12:03 AM


Features
 

Advertising
 

Newsgroups
 


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