+ Reply to Thread
Results 1 to 3 of 3

Compare 2 columns with another 2 columns as return value from 3rd column

  1. #1
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Sefton
    MS-Off Ver
    MS Office 365 ProPlus
    Posts
    131

    Compare 2 columns with another 2 columns as return value from 3rd column

    I've been searching the last few hours trying to figure this out. I know how to use vlookup to compare one column with another and return a value, but i'm struggling to compare 2 columns with 2 others at the same time and return a value.

    I have two sheets.
    Sheet one contains 17000 entries with Location, Date, Job Number information.
    Sheet two contains 600 entries with Location, Date, and Job Task information.

    Basically i need the Job Number from sheet 1 on sheet 2.
    The issue is, we will have visited the same location on multiple occasions and these would have a different job number, so i need to ensure the correct number is applied to each visit.
    I've attached a small example.
    It will probably turn out to be something really simple and i'll be kicking myself later...
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Compare 2 columns with another 2 columns as return value from 3rd column

    sheet2!d2=
    =INDEX(Sheet1!$C$2:$C$200,MATCH(A2&B2,INDEX(Sheet1!$A$2:$A$200&Sheet1!$B$2:$B$200,0),0))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Sefton
    MS-Off Ver
    MS Office 365 ProPlus
    Posts
    131

    Re: Compare 2 columns with another 2 columns as return value from 3rd column

    Perfect, that seems to have done the trick.
    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. Replies: 3
    Last Post: 07-25-2013, 03:20 PM
  2. Compare 2 columns and copy new values from the 2nd columns to a 3rd column
    By djarcadian in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-02-2013, 12:18 PM
  3. Replies: 0
    Last Post: 12-07-2011, 05:25 PM
  4. Compare values with 2 columns and return from the third
    By fms_me in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2010, 07:57 AM
  5. Compare values in 2 columns, return Y/N in a third column
    By creed1101 in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 07-08-2009, 01:29 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