+ Reply to Thread
Results 1 to 4 of 4

Defined number of characters

  1. #1
    Carrie
    Guest

    Defined number of characters

    I have a spreadsheet that has numerical values in cells of different lengths,
    ie xxx, xxxxxx, etc. I need to make all the values 6 characters long by
    adding or removing zeros at the beginning and therefore not altering the
    value. I then want it to appear as text rather than number. Can anyone help

  2. #2
    David Billigmeier
    Guest

    RE: Defined number of characters

    If your value was in A1:

    =TEXT(A1,"000000")


    --
    Regards,
    Dave


    "Carrie" wrote:

    > I have a spreadsheet that has numerical values in cells of different lengths,
    > ie xxx, xxxxxx, etc. I need to make all the values 6 characters long by
    > adding or removing zeros at the beginning and therefore not altering the
    > value. I then want it to appear as text rather than number. Can anyone help


  3. #3
    pinmaster
    Guest

    RE: Defined number of characters

    Try someting like:

    =IF(LEN(A1)<=6,TEXT(A1,"000000"),TEXT(RIGHT(A1,6),"000000"))

    HTH
    JG

    "Carrie" wrote:

    > I have a spreadsheet that has numerical values in cells of different lengths,
    > ie xxx, xxxxxx, etc. I need to make all the values 6 characters long by
    > adding or removing zeros at the beginning and therefore not altering the
    > value. I then want it to appear as text rather than number. Can anyone help


  4. #4
    PCLIVE
    Guest

    Re: Defined number of characters

    One way:
    =REPT(0,6-LEN(A1)) & A1

    HTH,
    Paul

    "Carrie" <[email protected]> wrote in message
    news:[email protected]...
    >I have a spreadsheet that has numerical values in cells of different
    >lengths,
    > ie xxx, xxxxxx, etc. I need to make all the values 6 characters long by
    > adding or removing zeros at the beginning and therefore not altering the
    > value. I then want it to appear as text rather than number. Can anyone
    > help




+ 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