+ Reply to Thread
Results 1 to 16 of 16

Need Help Moving Data from several Uneven Columns into one Formatted Table

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    Miami, FL
    MS-Off Ver
    Excel 2013
    Posts
    33

    Need Help Moving Data from several Uneven Columns into one Formatted Table

    I am working on a project for grad school and have a large list of companies and their largest shareholders. I need help moving the data into an organized table.

    Some columns are longer than others, and some do not contain any data and display #N/A N/A. I have attached an excel workbook that includes 6 columns of the data (the entire data has 937 columns).

    I added an example of what I hope the table will look like below that begins in cell A25. If the cell has #N/A N/A, the company is disregarded. If the company has large shareholders each shareholder is recorded in the table along with their company ticker in the column to the left of their name.


    This task is beyond my understanding and it would take me a long time to copy and paste the information. Any help is appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    Run the macro below on a dummy of your data.

    After that you only need to sort the data.

    NEW CODE added 11-02-2015: 21:46

    Please Login or Register  to view this content.
    Last edited by oeldere; 02-11-2015 at 04:46 PM. Reason: '(delete) red text
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    10-29-2012
    Location
    Miami, FL
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    Thanks,

    Is this a VBA formula? How do I run it?

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    Yes it is VBA.

    Push the button on the sheet output.

    See the attached file.

  5. #5
    Registered User
    Join Date
    10-29-2012
    Location
    Miami, FL
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    For some reason it does not copy all of the names. After Column C it only copies the first cell in Row 2 but skips the information in Rows 3,4,etc.
    Last edited by alacey425; 02-11-2015 at 04:40 PM.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    I changed the posted code in #2.

    See the new file with the amended code.

  7. #7
    Registered User
    Join Date
    10-29-2012
    Location
    Miami, FL
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    Thanks,
    When I plugged in my data I get an error and it says I need to debug and it is not giving all the names, just the first row in each column. Can you see what changes may have happened?

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    The reason is that the code counts the values in column A.

    What is the maximum number of names in a column?

  9. #9
    Registered User
    Join Date
    10-29-2012
    Location
    Miami, FL
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    100 names to be safe.

    is that why it says runtime error 1004?
    Last edited by alacey425; 02-11-2015 at 06:31 PM.

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    The N/A data also need to be saved (or they can be deleted) ?

  11. #11
    Registered User
    Join Date
    10-29-2012
    Location
    Miami, FL
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    They can be deleted

  12. #12
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    See the attached file.

    I made an workaround added data in column A.

    Other forummember can provide a "cleaner" solution.

    After that on the worksheet Output:

    I ran the macro delete text and delete #n/a n/a

    I ran the macro sort

    After that I made an pivot table.

    There are 4.213 names in the sheet.

  13. #13
    Registered User
    Join Date
    10-29-2012
    Location
    Miami, FL
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    I appreciate the help. You saved me an unbelievable amount of time.

  14. #14
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    Thanks for the reply.

    Glad I could help.

    Since you are new on the forum, you can add rep(utationpoints) to the one who helped you by clicking on the star on the left side.
    I noticed you already clicked the star, thanks for that.

  15. #15
    Registered User
    Join Date
    10-29-2012
    Location
    Miami, FL
    MS-Off Ver
    Excel 2013
    Posts
    33

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    I see there are several macros now.. Should I just click the button you created or do I need to open the macro window and run through them? When I input different data into sheet 1 for another state it did not delete the columns or create the pivot table.

  16. #16
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need Help Moving Data from several Uneven Columns into one Formatted Table

    The pivot table is added manualy.

    The button only acivates the macro CONVERTROWSTOCOL_Oeldere_revisted_new()

    Should I just click the button you created or do I need to open the macro window and run through them?

    Yes you have to activatie them yourself.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Split uneven data from a single columns to multiple columns
    By pfoz in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-13-2013, 08:24 AM
  2. Sort and Match Uneven Columns of data
    By MustardMan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-21-2012, 01:43 PM
  3. Replies: 2
    Last Post: 10-03-2009, 05:47 PM
  4. Converting columns of non-standard formatted data into a table (rows)
    By Peter33 in forum Access Tables & Databases
    Replies: 2
    Last Post: 10-02-2009, 04:36 PM
  5. Moving average for uneven sampled data?
    By Johan Myrberger in forum Excel General
    Replies: 1
    Last Post: 01-17-2005, 05:06 PM

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