+ Reply to Thread
Results 1 to 3 of 3

Can't seem to split data into digits right-aligned

  1. #1
    Registered User
    Join Date
    06-28-2011
    Location
    NY
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    1

    Can't seem to split data into digits right-aligned

    Would someone please help? I have a column of data values between 4 and 7 digits in length. I need to split them into separate columns so that they line up on the right, with blanks placed for non-existant significant figures; that is, the numbers
    1111678 and
    1234
    will have 8 and 4 in a column, 3 and 7 in a column, 6 and 2 in a column, 1 and 1 in a column, and blanks for the ten-thousand, hundred-thousand, and millions places for the row containing 1234. It's important that I don't have leading zeros (I was able to do it with MID() and Text(), but it gave me leading zeros) so that I can count the number of zeros accurately in, say, the hundred-thousands place.
    Thanks!
    ~A Noob

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Can't seem to split data into digits right-aligned

    Hi Noobachu

    Welcome to the Forum ...

    Could you run this past us again? ....

    Perhaps a sample workbook illustating your problem might be an advantage?

    Cheers

    From Forum FAQs

    How do I attach a file to a post?

    To attach a file to your post, you need to be using the main 'New Post' or 'New Thread' page and not 'Quick Reply'. To use the main 'New Post' page, click the 'Post Reply' button in the relevant thread.

    On this page, below the message box, you will find a button labelled 'Manage Attachments'. Clicking this button will open a new window for uploading attachments. You can upload an attachment either from your computer or from another URL by using the appropriate box on this page. Alternatively you can click the Attachment Icon to open this page.

    To upload a file from your computer, click the 'Browse' button and locate the file. To upload a file from another URL, enter the full URL for the file in the second box on this page. Once you have completed one of the boxes, click 'Upload'.

    Once the upload is completed the file name will appear below the input boxes in this window. You can then close the window to return to the new post screen.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Can't seem to split data into digits right-aligned

    numbers in col a then in b1 dragged across to h1 then down
    =IF(COLUMNS(A$1:$G$1)>LEN($A1),"",MID(TEXT($A1,"0000000"),COLUMN(A$1),1))
    note if you want real numbers not text
    =IF(COLUMNS(A$1:$G$1)>LEN($A1),"",--MID(TEXT($A1,"0000000"),COLUMN(A$1),1))
    Last edited by martindwilson; 06-28-2011 at 08:16 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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