+ Reply to Thread
Results 1 to 3 of 3

match two column in sheet 1 v shee 2 and find the result column

  1. #1
    Registered User
    Join Date
    03-06-2007
    Posts
    24

    match two column in sheet 1 v shee 2 and find the result column

    Hi all,

    I have two identical column in sheet 1 & sheet 2, I intend to compare both column and find the result of the value into sheet 1. Using vlookup can only search for one column. I look thru other site on net, it said needs to use both index & match function. But I am bit confuse and find no where how to go about. Please help me.

    my data in sheet 1
    Partno________JOB_______Qty
    PART1________JOBA______1
    PART2________JOBB______22
    PART1________JOBC______5

    compare to data in sheet 2
    Partno________JOB_______Qty
    PART1________JOBA______5
    PART2________JOBK______11
    PART1________JOBC______5
    PART2________JOBM______4

    I intend to compare both sheet and take the result of qty column in sheet 2 to sheet 1.

    Thanks.

    Lim

  2. #2
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: match two column in sheet 1 v shee 2 and find the result column

    You can use SUMPRODUCT. Assuming that Partno is on Col A and Job and Qty on Col B and C resp. Type the following on D2 of Sheet1:
    Please Login or Register  to view this content.
    Ron
    Knowledge is knowing that a tomato and pepper are fruits. Wisdom is knowing whether to put these in a fruit salad

    Kindly

    [1] Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily by editing your original post in advanced mode.
    [3] Thank (using the little scale) those that provided useful help; its nice and its very well appreciated

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: match two column in sheet 1 v shee 2 and find the result column

    smlim7,

    I assume that your title Partno on both worksheets is in cell A1.

    The macro uses columns D in both worksheets as a helper column.

    Detach/open workbook UpdateW1 if Partno_JOB found with w2 Qty - smlim7 - EF781452 - SDG12.xls and run the UpdateW1 macro.



    If you want to use the macro on another workbook:


    Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).


    1. Copy the below code, by highlighting the code and pressing the keys CTRL + C
    2. Open your workbook
    3. Press the keys ALT + F11 to open the Visual Basic Editor
    4. Press the keys ALT + I to activate the Insert menu
    5. Press M to insert a Standard Module
    6. Where the cursor is flashing, paste the code by pressing the keys CTRL + V
    7. Press the keys ALT + Q to exit the Editor, and return to Excel
    8. To run the macro from Excel, open the workbook, and press ALT + F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.


    Please Login or Register  to view this content.

    Then run the UpdateW1 macro.
    Last edited by stanleydgromjr; 06-23-2011 at 11:50 PM.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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