+ Reply to Thread
Results 1 to 5 of 5

Fill with zero

  1. #1
    RLB
    Guest

    Fill with zero

    Hi,
    I table of 3 digit numeric fields, data in field can be 1-3 significant
    digits. I use the numbers as input to another look up that requires all 3
    digits and filled with zeros. So I need a formula to determine number of
    significant digits in original field and if less than 3 fill to 3 with zeros.
    I tried "format" as well as "precision as displayed", but niether worked.

  2. #2
    Don Guillett
    Guest

    Re: Fill with zero

    To get 001 from 1
    format>custom>000

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "RLB" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > I table of 3 digit numeric fields, data in field can be 1-3 significant
    > digits. I use the numbers as input to another look up that requires all 3
    > digits and filled with zeros. So I need a formula to determine number of
    > significant digits in original field and if less than 3 fill to 3 with
    > zeros.
    > I tried "format" as well as "precision as displayed", but niether worked.




  3. #3
    Ragdyer
    Guest

    Re: Fill with zero

    Are you talking about -
    012
    OR
    120
    AND
    Are you talking about *true* XL numbers or text?

    For text you might try:

    =REPT(0,3-LEN(A1))&A1
    OR
    =TEXT(A1,"000")
    for 012

    =A1&REPT(0,3-LEN(A1))
    for 120


    --
    HTH,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------

    "RLB" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > I table of 3 digit numeric fields, data in field can be 1-3 significant
    > digits. I use the numbers as input to another look up that requires all 3
    > digits and filled with zeros. So I need a formula to determine number of
    > significant digits in original field and if less than 3 fill to 3 with

    zeros.
    > I tried "format" as well as "precision as displayed", but niether worked.



  4. #4
    RLB
    Guest

    Re: Fill with zero

    Ragdyer
    I tried the =rept and it worked.
    Thanks,
    RLB

    "Ragdyer" wrote:

    > Are you talking about -
    > 012
    > OR
    > 120
    > AND
    > Are you talking about *true* XL numbers or text?
    >
    > For text you might try:
    >
    > =REPT(0,3-LEN(A1))&A1
    > OR
    > =TEXT(A1,"000")
    > for 012
    >
    > =A1&REPT(0,3-LEN(A1))
    > for 120
    >
    >
    > --
    > HTH,
    >
    > RD
    >
    > ---------------------------------------------------------------------------
    > Please keep all correspondence within the NewsGroup, so all may benefit !
    > ---------------------------------------------------------------------------
    >
    > "RLB" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > > I table of 3 digit numeric fields, data in field can be 1-3 significant
    > > digits. I use the numbers as input to another look up that requires all 3
    > > digits and filled with zeros. So I need a formula to determine number of
    > > significant digits in original field and if less than 3 fill to 3 with

    > zeros.
    > > I tried "format" as well as "precision as displayed", but niether worked.

    >
    >


  5. #5
    RLB
    Guest

    Re: Fill with zero

    Hi Don,
    For some reason format doesn't work on this problem. When I go to format
    cell it is a "special with chinese" and when I change to custom 000 it won't
    take.
    Bob

    "Don Guillett" wrote:

    > To get 001 from 1
    > format>custom>000
    >
    > --
    > Don Guillett
    > SalesAid Software
    > [email protected]
    > "RLB" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi,
    > > I table of 3 digit numeric fields, data in field can be 1-3 significant
    > > digits. I use the numbers as input to another look up that requires all 3
    > > digits and filled with zeros. So I need a formula to determine number of
    > > significant digits in original field and if less than 3 fill to 3 with
    > > zeros.
    > > I tried "format" as well as "precision as displayed", but niether worked.

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1