Re: Adding Zeros as placeholders

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: DDM (DDMara_at_YaNOSPAMhoo.com)
Date: 05/21/04


Date: Fri, 21 May 2004 18:38:53 -0400

Hi Frank,

Truth to tell, I had my doubts, too, knowing that Excel only allows so many
significant digits. However, Seth did say that most of his entries were in
the range of 6-10 digits, and in my light testing, the format delivered the
desired result every time. So I thought I might suggest it as an alternative
to the formula-based solutions that other respondents provided.

-- 
Regards,
DDM
"DDM's Microsoft Office Tips and Tricks"
Visit us at www.ddmcomputing.com
"Frank Kabel" <frank.kabel@freenet.de> wrote in message
news:e6zGyP3PEHA.1160@TK2MSFTNGP09.phx.gbl...
> Hi
> I doubt this will work as this would require more than 15 significant
> digits
>
> --
> Regards
> Frank Kabel
> Frankfurt, Germany
>
> "DDM" <DDMara@YaNOSPAMhoo.com> schrieb im Newsbeitrag
> news:uUIhlB3PEHA.808@tk2msftngp13.phx.gbl...
> > Seth, how about a custom format? Select the cells and Format > Cells
> >
> > Number > Custom. In the Type: field enter 00000000000000000000 and
> click OK.
> >
> > --
> > DDM
> > "DDM's Microsoft Office Tips and Tricks"
> > Visit us at www.ddmcomputing.com
> >
> >
> > "Seth" <Cashsrs_support@qwest.net> wrote in message
> > news:105e601c43f65$ad3428e0$a101280a@phx.gbl...
> > > Is there a formula to add zeros (or any character) to a
> > > cell with a fixed width?
> > > I am currently using a formula, =A1&REPT(" ",20-LEN(A1)),
> > > which will extend the character length of a cell to 20,
> > > this works for items that are left justified and entries
> > > that contain fewer than 20 characters just have spaces to
> > > fill up the remaining charaters.
> > > What I am looking for is a way to add characters to the
> > > front of an entry and still enforce the fixed length.
> > > Example:
> > > A cell contains 123456789
> > > I would like the cell to have a fixed length of 20
> > > chracters, and the "missing" characters are filled with
> > > zeros placed in front of the entry. To look like this.
> > > 00000000000123456789
> > > I am working with entries between 6 and 10 characters in
> > > length.
> > >
> > > Thank you in adavance for your time.
> >
> >
>


Relevant Pages

  • Re: INT defect: Please try this on 2007 for me
    ... Not that I would object to a calculation option that would do just that, namely: force the result of all formulas to be rounded to 15 significant digits, not unlike the "Precision as displayed" option, but more generally applied. ... That would legitimatize some of the heuristics that Excel has implemented to try to ameliorate the aberrations due to binary floating point arithmetic. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Interesting math
    ... "C Float Number" must have "exactly six digits after the ... The "six or more significant digits" requirement has little ... data type called "float" that can represent floating-point ... articles, or your posts? ...
    (alt.usage.english)
  • Re: loan amortization
    ... you have about 14 significant digits. ... your are working on a $100,000.00 mortgage. ... An insurance company insider told me that they once spotted a penny difference ...
    (comp.lang.java.programmer)
  • Re: Define an array with double precision and integer simultaneously.
    ... number because selected_real_kindasks for the lowest precision ... has more than 9 significant digits would be nonsense. ... Floating point arithmetic doesn't follow the same rules regarding decimal digits of precision as one is used to. ...
    (comp.lang.fortran)
  • Re: Creating a Password
    ... If a user limits a password to only digits, wouldn't the "possible" entries ... >> letters in the dictionary when possible. ... > "Without knowledge you have fear, with fear you create your own ...
    (microsoft.public.security)