+ Reply to Thread
Results 1 to 7 of 7

Map Columns With Different Header Names Using A Dynamic Table

  1. #1
    Registered User
    Join Date
    06-17-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2016
    Posts
    20

    Map Columns With Different Header Names Using A Dynamic Table

    Greetings Experts!

    I can't quite seem to expected results. I have hundreds of sheets coming in from customers that I need to format for uploading - so I want to map their column headings to mine. Some times they have columns I don't want. My template always has columns that must be included but don't always have input from customers. I've included a file that shows you the input, the template, the dynamic map - that could be changed as header names change on the input file and my expected results. I have found some code on the internet that does a little of what I'm looking for but that is added in a text box in the file as well.

    Thanks in advance for your help
    Jess
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Map Columns With Different Header Names Using A Dynamic Table

    In sheet DynamicMap in Coluumn C are now the ColumnNumbers of MasterTemplate
    only thing to do is fill column B with headers of InputData and run macro


    Please Login or Register  to view this content.
    Kind regards
    Leo
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-17-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2016
    Posts
    20
    Leo, you are wonderful, i will try this as soon as i get to my computer and let you know how it goes. Thank you for taking the time.

    Quote Originally Posted by LeoTaxi View Post
    In sheet DynamicMap in Coluumn C are now the ColumnNumbers of MasterTemplate
    only thing to do is fill column B with headers of InputData and run macro


    Please Login or Register  to view this content.
    Kind regards
    Leo

  4. #4
    Registered User
    Join Date
    06-17-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2016
    Posts
    20

    Re: Map Columns With Different Header Names Using A Dynamic Table

    Leo - is it possible to have blanks in the beginning of the template?
    When I put a blank in the beginning of the template (a field that will not be populated
    but is used for upload to database) - it no longer works.
    Is it possible to read the column number of where the data is to go in the template,
    match the header name from column B in the DynamicMap - copy row 2 to end,
    then paste in template based on the column number location?
    I think that would work perfectly.... I just am not able to make it work.

    new sample attached.

    Thanks!!!
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Map Columns With Different Header Names Using A Dynamic Table

    Cell B2 in Dynamic Sheet was not Emty in your file, and little modification in code

    Please Login or Register  to view this content.
    Kind regards
    Leo
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-17-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2016
    Posts
    20

    Re: Map Columns With Different Header Names Using A Dynamic Table

    Leo, This is so close - I think my "real" data sheets are more complex than the samples I am sending, and I've been adjusting to try and make it work, but I'm not getting the expected results that I get with the sample. I'm attaching the complicated version of what I need - in hopes that there is one line of copy the column with a number at the last row and past to "ExpectedResults" page using that number as the index to locate the column number and paste starting at A2, so the ExpectedResults headers don't move. and as added info - I don't need to ever append to ExpectedResults, each upload will produce a unique output.

    Thank you for your dedication to this - I'm learning so much through you code! You're my hero!
    Jess
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Map Columns With Different Header Names Using A Dynamic Table

    Please Login or Register  to view this content.
    Kind regards
    Leo

+ 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. dynamic excel table header / column selection
    By carsto in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-27-2016, 11:25 AM
  2. [SOLVED] Sum the numbers horizontally across columns based on header names
    By BryGuy81 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-05-2016, 02:01 AM
  3. Variable Table Header Names
    By How How in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-04-2016, 02:29 PM
  4. [SOLVED] Dynamic Drop down lists using numbers as header names
    By verno74 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-22-2015, 04:54 PM
  5. Accessing table row items by row and column header names
    By margie_68 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-15-2015, 10:19 AM
  6. Replies: 10
    Last Post: 10-09-2014, 06:20 PM
  7. Replies: 0
    Last Post: 08-29-2013, 10:07 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