+ Reply to Thread
Results 1 to 3 of 3

Need help with combining data from irregularly structured worksheets under specific header

  1. #1
    Registered User
    Join Date
    08-07-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    1

    Need help with combining data from irregularly structured worksheets under specific header

    Hello,

    I'm new to the forum, so please pardon me if I accidentally annoy any of you.

    I’m looking for a solution to the following problem: I have a workbook with various worksheets having different field structures, and repeats of headers within the same worksheet.

    I’ve attached a copy of the example worksheet to help illustrate the issue. I’ve tried looking through various solutions for merging columns, but the solutions seem to involve copying entire columns, or depend on a regular field structure. This is impractical for my task, so perhaps you could help.

    For the output, I’d need my VBA to:
    Go through all the worksheets, find a header and collate all the values under the specified header. For example, if I wanted a list of all Eggs and Frogs in the workbook, I’d need to look under each worksheet, in all the cells under the Eggs and Frogs headers and store them in a separate newly generated workbook (or worksheet if impractical)

    The sequence is unimportant as it is just a lump of data for an importer tool, but the Eggs and Frogs fields need to be properly aligned as they appear in the raw data.

    example sheet.xlsx

  2. #2
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Need help with combining data from irregularly structured worksheets under specific he

    Hi,

    You will need VBA for this:
    You need to lookup header for lets say Eggs first, search each header cell till last and where it matches copy the column to output sheet and so on ....
    Click on "* Add Reputation" as a way to say thanks

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Need help with combining data from irregularly structured worksheets under specific he

    Kirika,
    I have hard time coding as the names do not match with out trimming them. You have lost of spaces between the names.
    I have amended the code and has the same result as your output.
    Attached Files Attached Files
    Last edited by AB33; 08-07-2014 at 04:11 PM.

+ 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. Semi-structured bloomberg ticker data to go into a clean 3 header table
    By jasonleewkd in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-23-2013, 12:12 PM
  2. Variants on Structured References i.e. [@Header]
    By SymphonyTomorrow in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-05-2013, 03:59 PM
  3. [SOLVED] Extraction of specific data after # Combining multiple worksheets to master file
    By king10001 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-17-2013, 06:31 PM
  4. Pulling Data from Irregularly Formatted Column
    By ISI_Med in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-13-2013, 10:04 AM
  5. Replies: 5
    Last Post: 07-15-2009, 03:32 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