+ Reply to Thread
Results 1 to 3 of 3

Transposing sets of data based on formatting

  1. #1
    Registered User
    Join Date
    06-26-2010
    Location
    Blacksburg, Virginia
    MS-Off Ver
    Excel 2007
    Posts
    5

    Transposing sets of data based on formatting

    I have copied and pasted a table from the internet into a spreadsheet and am having trouble reformatting the data nicely.

    The data are listed as follows:

    Please Login or Register  to view this content.
    I would like to reformat it to look like this
    Please Login or Register  to view this content.
    Where g1- indicates it belongs in group 1 and g2- indicates it belongs in group 2. For each group, column A could contain 4-6 rows and column D could contain 1-3 rows. There are roughly 42,000 rows in my sheet, so doing things manually is really not an option. Luckily, the start of a new group is indicated by bold formatting. Meaning, A1 and A6 would both be bold.

    Do you have any suggestions on how to set this up in VBA? If the groups were separated by a blank row, I could figure it out, but not separated by formatting, so I am at a loss.

    I have attached a sample spreadsheet for any clarification.
    Attached Files Attached Files
    Last edited by scrchrds; 09-28-2011 at 02:16 PM.

  2. #2
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389

    Re: Transposing sets of data based on formatting

    Hi..
    hers is some code for you. please reads the notes. to understand the limitations.
    Please be aware it may take some time to run on a large sheet.
    ( this code was pasted in on Sheet 1 of the VBA editor)
    See attached workbook.
    HTH
    Steve

    Please Login or Register  to view this content.
    Goodluck!
    Attached Files Attached Files
    VBA - The Power Behind the Grid

    Posting a sample of your workbook makes it easier to look at the Issue.

  3. #3
    Registered User
    Join Date
    06-26-2010
    Location
    Blacksburg, Virginia
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Transposing sets of data based on formatting

    This is great!

+ 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