+ Reply to Thread
Results 1 to 12 of 12

Need to get the data based on Column Header

  1. #1
    Forum Contributor
    Join Date
    10-16-2010
    Location
    bangalore
    MS-Off Ver
    Excel 2019
    Posts
    288

    Need to get the data based on Column Header

    Hello,

    I m downloading the dump from system which is having multiple column headers and every time these header will not come in the order. So, i m not able to apply formula. Please help me in getting the required header data based on the column header. Here i have attached the sample data with dump and expected result in output sheet.

    Pls look into this and help.
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Need to get the data based on Column Header

    Try something like this in A2:

    =INDEX(Dump!$A:$G,ROW($A1)+1,MATCH(A$1,Dump!$A$1:$G$1,0))

    Drag it to the right and then down as far as needed.

    I would change $A:$G to a smaller range such as $A$1:$G$1000 but I'll leave that to you.

    Is this what you are looking for?

  3. #3
    Forum Contributor
    Join Date
    10-16-2010
    Location
    bangalore
    MS-Off Ver
    Excel 2019
    Posts
    288

    Re: Need to get the data based on Column Header

    Yes....Thanks a lot for your immediate help....

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Need to get the data based on Column Header

    You're welcome. Thanks for the rep!

    If that solved your question, please mark this thread as SOLVED.

  5. #5
    Forum Contributor
    Join Date
    10-16-2010
    Location
    bangalore
    MS-Off Ver
    Excel 2019
    Posts
    288

    Re: Need to get the data based on Column Header

    Hello,

    If in the Dump sheet header name is "Continent" but in my output sheet it is "Continent Name", How can i get the details with the above formula without making the unique header name...pls guide.....if this works then this would really help me to get the most of the data by mapping the header..

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Need to get the data based on Column Header

    In A2 of the 'Output' sheet, try this:

    =INDEX(Dump!$A:$G,ROW($A1)+1,MATCH(IFERROR(LEFT(A$1,FIND(" ",A$1)-1),A$1),Dump!$A$1:$G$1,0))

    This formula looks for the first word in the header of the 'Output' sheet and compares that to the headers of the 'Dump' sheet.

  7. #7
    Forum Contributor
    Join Date
    10-16-2010
    Location
    bangalore
    MS-Off Ver
    Excel 2019
    Posts
    288

    Re: Need to get the data based on Column Header

    Can we do the mapping for each header and get the results, because many of the column header in the dump doesn't match with the header in output sheet.
    For Eg; I have a header name as "Associate" in dump where as i have "User Name" in my output sheet. In such cases it will not work..
    Last edited by anwitha; 10-16-2017 at 09:55 AM. Reason: chge

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,418

    Re: Need to get the data based on Column Header

    Create a table somewhere that maps the column headers an one sheet to the other, then use this with a VLOOKUP or INDEX MATCH.

    EVEN BETTER: Give the columns matching headers!
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  9. #9
    Forum Contributor
    Join Date
    10-16-2010
    Location
    bangalore
    MS-Off Ver
    Excel 2019
    Posts
    288

    Re: Need to get the data based on Column Header

    I have given the expected result in the attached sheet with mapping details. Pls help if anyone can get this requirement with formula.
    Attached Files Attached Files

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,418

    Re: Need to get the data based on Column Header

    You need to add continent to your mapping table, even though it's the same, then use this:

    =INDEX(Dump!$A$2:$G$4,ROW(),MATCH(INDEX($I$4:$I$7,MATCH(A$1,$K$4:$K$7,0)),Dump!$A$1:$G$1,0))

    copied across and down.

  11. #11
    Forum Contributor
    Join Date
    10-16-2010
    Location
    bangalore
    MS-Off Ver
    Excel 2019
    Posts
    288

    Re: Need to get the data based on Column Header

    Now this really works awesome...thanks a lot.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,418

    Re: Need to get the data based on Column Header

    Yes, it sure does - I've learnt a helluva lot since being a member here.

    Glad to have helped!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. [SOLVED] Extract Data from another Workbook based on Column Header
    By sunjam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2017, 05:57 AM
  2. Change Column of Data From Number to Currency Based on Header
    By Yoandsm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2017, 02:05 PM
  3. [SOLVED] VBA help needed to add data validation based on matching column header from another sheet
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-12-2017, 02:24 AM
  4. Copy data based on column header in a table to a new location
    By karthik.jaish in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2016, 03:05 AM
  5. [SOLVED] Based on Column Header find and copy data from one sheet to another
    By Sachy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-31-2014, 10:00 AM
  6. write userform data to cell based on column header
    By EMAP in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-13-2012, 08:30 AM
  7. Replies: 6
    Last Post: 07-26-2012, 06:34 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