+ Reply to Thread
Results 1 to 2 of 2

Compare two sheets and copy match value to new sheet

  1. #1
    Registered User
    Join Date
    07-31-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    1

    Compare two sheets and copy match value to new sheet

    Hi,

    I am new to macros and am trying to solve a problem where I have some data in sheet1 and sheet2.
    Data on Sheet1 is as follows:
    #Unit test Maths History Science
    1 70 55 95
    2 60 64 52
    3 50 85 33
    4 75 60 62
    5 65 70 94
    6 40 55 86
    7 70 58 41
    8 40 60 99

    Data on Sheet2 is as follows:
    ID #Unit test
    1231 1 Maths History Science
    1232 3 History Science
    1233 5 Science Maths
    1234 5 History Maths
    1235 2 Science
    1236 7 History
    1237 8 Maths Science

    I want to compare data of sheet2 with sheet1 such that #Unit test for each ID is identified and is looked up in sheet1. Further, subjects of respective ID is identified from Sheet2 is identified and looked up in sheet1. Subjects value from Sheet1 is copied to sheet3 along with ID and #Unit test. Sheet3 should look like:
    ID #Unit test Maths History Science
    1231 1 70 55 95
    1232 3 85 33
    1233 5 65 94
    1234 5 65 70
    1235 2 52
    1236 7 58
    1237 8 40 99

    Any help on this will be highly appreciated.

    Thanks.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Compare two sheets and copy match value to new sheet

    Try the attached file and let me know
    Attached Files Attached Files
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

+ 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] Compare 2 sheets, match data in 1 column, update row in sheet 2 & add new rows not matched
    By Synchronicity in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-11-2013, 01:21 PM
  2. Replies: 0
    Last Post: 10-25-2012, 03:38 PM
  3. Macro to Compare two sheets, if match then copy two cells from one sheet to the other
    By ali.whitaker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2012, 02:13 PM
  4. Compare with other sheet, no match, then copy Row
    By ABBOV in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2010, 02:07 AM
  5. Compare two sheets, copy from one if values match
    By teaker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2009, 01:27 PM

Tags for this Thread

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