+ Reply to Thread
Results 1 to 4 of 4

Extract Data to Template - Headers Change

  1. #1
    Registered User
    Join Date
    02-24-2020
    Location
    Canada
    MS-Off Ver
    Home & Business 2013
    Posts
    6

    Extract Data to Template - Headers Change

    Hi All,
    This is my first post/inquiry. I am not certain if my inquiry has been resolved before. If so, please do advise where I can read up on it.
    If not, here is my question...
    I have a "DATA" worksheet that I pull from a source. In this worksheet, the number of columns can change as well as the name of the headers.
    As far as rows, the rows can be large number of rows.
    Also...on the data file, there are values/cells that are duplicated and unique.

    I have a separate worksheet that I call a "Template" that I would like the information from the "DATA" worksheet extracted to.

    I've attached a very simplified one tab Excel file showing the DATA and Template(what the expected result will look like).
    I've tried VLookUP. I've tried INDEX MATCH. I tried INDEX AGGREGATE, which was way out of my comprehension, and I still can't get the correct results.
    Any help is greatly appreciated!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-24-2020
    Location
    Thailand
    MS-Off Ver
    Office 2021
    Posts
    974

    Re: Extract Data to Template - Headers Change

    Hi k.mak,
    If the raw DATA is changing in the number of columns you have or the order of the columns, we can work with that by picking the header dynamically as log as there is some logic.
    For excample, in your sample file you have 'last_name' in the DATA and 'SURNAME' in your template. Will the 'SURNAME' always be 'last_name' in the DATA sheet or will that vary too (familyname, LastName, main-name...).
    Is there any column in the DATA which always will be unique?

  3. #3
    Registered User
    Join Date
    02-24-2020
    Location
    Canada
    MS-Off Ver
    Home & Business 2013
    Posts
    6

    Re: Extract Data to Template - Headers Change

    Hi ORoos,
    The answer is no. The column headers will not be unique.
    I had thought of creating a tab called "categories" in which several columns will have these list of variations.
    Therefore, the template will have to look up these variation names, find the column that display these names, then extract the info from each row of this column.
    I know it's a crazy task.

  4. #4
    Valued Forum Contributor
    Join Date
    03-24-2020
    Location
    Thailand
    MS-Off Ver
    Office 2021
    Posts
    974

    Re: Extract Data to Template - Headers Change

    Yep, sounds crazy!
    Simplest solution would of course be to get the source data standardised if that is possible at all.
    Otherwise, reference tables with all the possible names for each heading would be required to link the data.

+ 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. macro to extract mixed headers description to a template from different files
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-18-2018, 11:09 AM
  2. [SOLVED] macro extract data by headers from sheet1 to sheet2
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-29-2018, 10:27 PM
  3. Extract and Merge Data based on Column Headers
    By Krix in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2017, 02:08 PM
  4. [SOLVED] macro to copy speciifc headers data to an extract sheet in same workbook
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-26-2016, 01:32 PM
  5. [SOLVED] extract data with multiple headers and dates in colA
    By roothog in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-03-2015, 07:08 AM
  6. [SOLVED] How can I change the data in columns into headers?
    By Jan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-06-2006, 09:55 PM
  7. extract and append data to a template
    By amma in forum Excel General
    Replies: 0
    Last Post: 01-05-2006, 10:40 AM

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