A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

converting db need six digit w leading zeros,



 
 
Thread Tools Display Modes
  #1  
Old May 21st, 2010, 02:05 AM posted to microsoft.public.excel.worksheet.functions
eStreet4ever
external usenet poster
 
Posts: 1
Default converting db need six digit w leading zeros,

I need to have a six digit value for an ID field. Old db has values ranging
from one to four characters and need to front fill with zeros
  #2  
Old May 21st, 2010, 02:31 AM posted to microsoft.public.excel.worksheet.functions
Brad
external usenet poster
 
Posts: 943
Default converting db need six digit w leading zeros,

=right("000000"&a1,6)

Assuming information is in cell a1

--
Wag more, bark less


"eStreet4ever" wrote:

I need to have a six digit value for an ID field. Old db has values ranging
from one to four characters and need to front fill with zeros

  #3  
Old May 21st, 2010, 05:51 AM posted to microsoft.public.excel.worksheet.functions
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default converting db need six digit w leading zeros,

If this is just for display purpose then custom format the cells to 000000

The below will return the value as text and not numeric...
=TEXT(A1,"000000")

--
Jacob (MVP - Excel)


"eStreet4ever" wrote:

I need to have a six digit value for an ID field. Old db has values ranging
from one to four characters and need to front fill with zeros

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.