+ Reply to Thread
Results 1 to 10 of 10

match data between two sheets and copy word based on header

  1. #1
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    match data between two sheets and copy word based on header

    hello
    I have data in sheet1 in column A,B , what I want match the headers in sheet2 with the data in sheet1 if the data are matched then should copy the word CASE which is existed in header in sheet1 for instance when match the name ALI and header ***-1 in sheet 2 with the data in sheet1 should copy word CASE of header in sheet1 and put for the name if it's matched see the word CASE in sheet 2 how should be when match the name and the headers

    thanks
    Attached Files Attached Files
    Last edited by ABDELFATTA; 06-21-2021 at 05:48 AM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: match data between two sheets and copy word based on header

    Formula in C3
    =IFERROR(INDEX(SHEET2!$A$1:$F$6,MATCH(A3,SHEET2!$A$1:$A$6,0),MATCH(B3,SHEET2!$A$1:$F$1,0)),"")

    vba
    Please Login or Register  to view this content.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: match data between two sheets and copy word based on header

    Another option...
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: match data between two sheets and copy word based on header

    If other way around
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: match data between two sheets and copy word based on header

    @sintek thanks so much for your great answering

  6. #6
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: match data between two sheets and copy word based on header

    @jindon thanks , but your codes don't work
    the first it shows only values 0 in COL C in sheet1 , it doesn't show the word CASE in sheet2
    the second it gives error "application defined or object defined error in this line
    HTML Code: 

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: match data between two sheets and copy word based on header

    .................
    Attached Files Attached Files

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: match data between two sheets and copy word based on header

    Glad I could contribute...Tx for rep +

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: match data between two sheets and copy word based on header

    OOps,, ex 2010
    Try change to
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: match data between two sheets and copy word based on header

    @Jindon many thanks for correcting

+ 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. VB Code to copy certain data based on header
    By rmomin in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-11-2021, 09:30 AM
  2. [SOLVED] import data based on header after match among multiple files
    By KalilMe in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 04-30-2021, 08:24 AM
  3. [SOLVED] copy based on header match
    By ell_ in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-05-2020, 06:27 AM
  4. [SOLVED] Copy Data Between Sheet based on The Same Name Header
    By Jhon Mustofa in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-03-2020, 10:49 PM
  5. Macro to copy header row and data row in separate sheets
    By aganesan99 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-19-2014, 12:28 PM
  6. [SOLVED] Match header information and copy data
    By aprcamb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-31-2013, 10:58 AM
  7. Update data from other sheets based on Row Header
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2011, 04:57 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