+ Reply to Thread
Results 1 to 3 of 3

Comparing Columns Between Worksheets to Find a Value

  1. #1
    Registered User
    Join Date
    10-20-2010
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    39

    Comparing Columns Between Worksheets to Find a Value

    (Sample Workbook uploaded)

    Hi,

    I need to fill in the empty cells in Column P (sheet1). This value(s) is to be found in Sheet2 Column A.

    The procedure for the macro:
    - Run only for empty cells in Sheet1 Column P (skips cells with data)
    - Compare the data in the 3 columns in Sheet1 (E, F and H) with the data in the 3 Columns of Sheet2 (E,H, and F) respectively.
    - If all the 3 columns match each other then copy the value from the respective cell in Column A Sheet2 and paste it to the respective cell in Column P Sheet1.
    - In case of multiple matches, all the matching values found in Column A Sheet2 should be pasted in Column P Sheet1.

    I hope you can help me with this. Either via VB Code (macro) or an Excel procedure.

    Thank You,
    JN
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-20-2010
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: Comparing Columns Between Worksheets to Find a Value

    Duplicate Posting:
    http://www.mrexcel.com/forum/showthread.php?t=509848
    http://www.ozgrid.com/forum/showthread.php?t=148142

  3. #3
    Registered User
    Join Date
    10-20-2010
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: Comparing Columns Between Worksheets to Find a Value

    I used this code in cell R2 Sheet1
    =MATCH(1, (E2=Sheet2!$E$5:$E$12) * (F2=Sheet2!$H$5:$H$12) * (H2=Sheet2!$F$5:$F$12), 0)

    Enter the formula by pressing Ctrl+Shift+Enter. Copy down.

    Then I entered the formula in cell S2 Sheet 1
    =INDEX($A$5:$A$12, R2)

    Copy Down.

    This only gives me 1 instance of the matching value. I would like to get all the matching values and not only the first match. How would that be possible ?
    Last edited by jimmy_nora; 11-19-2010 at 08:50 AM.

+ 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