+ Reply to Thread
Results 1 to 6 of 6

Compare two cells (text) and copy values if there is a match (vlookup?)

  1. #1
    Registered User
    Join Date
    04-12-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Compare two cells (text) and copy values if there is a match (vlookup?)

    Hi there,

    I attached an example of what I'm working on.

    I've got a list of unique destinations (column C) coupled with an average price for each (column D). I also have a large list of destinations with many duplicates (colum A). In column B, I would like to copy the average prices found in column D when destinations (unique list and expanded list) match.

    Ex:
    Please Login or Register  to view this content.
    Thanks!
    Attached Files Attached Files
    Last edited by Brett Mercier; 04-12-2013 at 10:59 AM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Compare two cells (text) and copy values if there is a match (vlookup?)

    In B2 and copy down..?

    =SUMPRODUCT(($C$2:$C$1000=A2)*($D$2:$D$1000))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Compare two cells (text) and copy values if there is a match (vlookup?)

    One way...

    Entered in B2 and copied down:

    =VLOOKUP(A2,C:D,2,0)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    04-12-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Compare two cells (text) and copy values if there is a match (vlookup?)

    Thanks Tony, that worked like a charm!

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Compare two cells (text) and copy values if there is a match (vlookup?)

    You're welcome. Thanks for the feedback!

  6. #6
    Registered User
    Join Date
    04-10-2013
    Location
    Saudia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Compare two cells (text) and copy values if there is a match (vlookup?)

    same query

+ 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