+ Reply to Thread
Results 1 to 6 of 6

Automatic vertical alignment of multiple cells into a single cell

  1. #1
    Registered User
    Join Date
    12-05-2012
    Location
    nevada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Automatic vertical alignment of multiple cells into a single cell

    I have 5 columns of data where each column of data has two number in it separate by a space where the headers for each column is c1, c2, c3, c4 and c5. for example

    c1 c2 c3 c4 c5 c6 c7 etc
    1 1 1 2 2 2 2 1 1 1
    3 3 3 4 4 4 4 3 3 3
    etc

    where each of these number pairs is under a separate column. The preview option for this forum editor is showing quite a difference between intended presentation and actual...sorry

    What I am looking to do is for each line item is to put the content of each row into a single cell with vertical alignment of the pairs of numbers. for example
    c6
    1 1
    1 2
    2 2
    2 1
    1 1

    3 3
    3 4
    4 4
    4 3
    3 3

    where each group of five pairs is in a single cell.

    I am looking to do this in as automated an approach as possible. I dont want to have to ctrl-enter for example 4 times for each cell in c6 for 1000 different line items..
    can anyone recommend a nice approach for this? thanks

    I am noticing on preview that the formatting is all whacked..not sure how to address this. Sorry
    Last edited by gomer121213; 12-05-2012 at 03:16 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Automatic vertical alignment of multiple cells into a single cell

    i would suggest you upload a sample work book, (all sensitive data removed), showing what data you are working with, what your expected outcome is, and how you arrived at that

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    12-05-2012
    Location
    nevada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Automatic vertical alignment of multiple cells into a single cell

    Thanks for the tips on clarifying the posting.

    I have attached a sample workbook with the issue presented.
    Columns O thru S contain the data pairs, that is two values separate by a space for each of these cells. Note that these pairs are simply obtained from the previous columns.
    What I am looking to do is to operate on these columns and create an output which looks like that in Column U.
    The main goal is to get to Column U, leveraging columns O thru S (or use any of the previous column source data is fine also).
    I forced the output manually using 'Ctrl-enter' for these cells, but want to do this automatically so I can apply it to thousands of records.

    thanks for your consideration.
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Automatic vertical alignment of multiple cells into a single cell

    try these 2 options. the 1st is from scratch and doesnt use O:S. the 2nd does use them.

    =E2&" "&F2&CHAR(10)&G2&" "&H2&CHAR(10)&I2&" "&J2&CHAR(10)&K2&" "&L2&CHAR(10)&M2&" "&N2
    =O2&CHAR(10)&P2&CHAR(10)&Q2&CHAR(10)&R2&CHAR(10)&S2

    Note: make sure you format them as wrap text

  5. #5
    Registered User
    Join Date
    12-05-2012
    Location
    nevada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Thumbs up Re: Automatic vertical alignment of multiple cells into a single cell

    Awesome.. perfect...thanks so much..

    [SOLVED]

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Automatic vertical alignment of multiple cells into a single cell

    happy to help and thanks for marking the thread "solved" - it helps keep things neet and tidy lol, consider adding the reputation to those that helped (see point 3 below)

+ 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