Announcement

Collapse
No announcement yet.

numbers to text and insert leading zeros

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • numbers to text and insert leading zeros

    what is the best way to convert numbers to text and insert leading zeros at the same time? Columns of numbers to insert leading zeros and change to text:
    654 00000654
    65465 00065465
    654655 00654655
    54 00000054
    1900548 01900548
    2245659 02245659

    I want them all to end up 8 digits, padding the front with zeros as needed.
    I tried data, text to columns, but how can I insert the zeros? (large files)

    Thank you,

  • #2
    Re: numbers to text and insert leading zeros

    Can you not just goto Format>Cells..., pick Custom Format and enter 00000000?
    Boo!

    Comment


    • #3
      Re: numbers to text and insert leading zeros

      it changes the displayed values, but when I load the file to another program, it removes the zeros.

      Comment


      • #4
        Re: numbers to text and insert leading zeros

        try the following if number is in A1 in B1

        Code:
         =text(a1,"00000000")
        Change a1 to appropriate cell referance. Copy down appropriate range.

        The select the column and do a copy/paste special value

        Comment


        • #5
          Re: numbers to text and insert leading zeros

          Thanks very much.

          Comment


          • #6
            Re: numbers to text and insert leading zeros

            You're welcome

            Comment

            Working...
            X