+ Reply to Thread
Results 1 to 4 of 4

Comparing two columns for match, then listing and performing calculation

  1. #1
    Registered User
    Join Date
    08-06-2015
    Location
    Ontario, Canada
    MS-Off Ver
    Office 2013
    Posts
    2

    Comparing two columns for match, then listing and performing calculation

    I have two sets of data; they contain a product number, description, and a cost. They are currently on separate sheets (Sheet1 and Sheet2), but they can be copied to the same sheet if necessary.

    Product Number Description Cost | Product Number Description Cost
    90001 Item 1 34.99 | 90001 Item 1 31.99
    90002 Item 2 17.99 | 90002 Item 2 16.99
    90003 Item 3 9.99 | 90003 Item 3 11.99

    Effectively, I want to:
    1. Check if the product number from set 1 exists in set 2.
    2. Return the product numbers that match and each cost.
    3. Calculate which is cheaper. (Obviously if it's able to pull the matches and their costs, it'd be simple to do the calculation in an adjacent cell afterwards)

    The 1st list has almost 16000 items, and the 2nd is just under 13000.

    I've tried tinkering with vlookup, match, index, etc.. and haven't had luck getting things to work properly. Even just highlighting duplicates to try and filter leads to highlighting numbers that aren't duplicates or missing duplicates that I can plainly see.

    Any help would be greatly appreciated.
    Attached Files Attached Files
    Last edited by divito; 01-13-2022 at 09:27 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,451

    Re: Comparing two columns for match, then listing and performing calculation

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    08-06-2015
    Location
    Ontario, Canada
    MS-Off Ver
    Office 2013
    Posts
    2

    Re: Comparing two columns for match, then listing and performing calculation

    Updated, thanks.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Comparing two columns for match, then listing and performing calculation

    Perhaps this will help.
    1. Column D on Sheet1 is populated using: =IFERROR(INDEX(Sheet2!C$2:C$20,MATCH(A2,Sheet2!A$2:A$20,0)),"N/A")
    2. The follow conditional formatting rules are used to highlight the cheaper cost green
    For column C: =C2<D2
    For column D: =D2<C2
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Comparing two columns if they match sum the third column
    By Dave42 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-07-2021, 05:43 PM
  2. Comparing Columns to Match Duplicates ?
    By zooba72 in forum Excel General
    Replies: 11
    Last Post: 07-16-2015, 01:43 AM
  3. Comparing two columns and if there is a match...
    By Carmine in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-10-2015, 10:03 AM
  4. Comparing columns and deleting those that do not match
    By Insert Name in forum Excel General
    Replies: 11
    Last Post: 01-01-2013, 06:16 PM
  5. [SOLVED] Comparing two columns and displaying a third value if they match
    By pdxcollegegrl in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-29-2012, 12:46 PM
  6. Comparing multiple columns using MATCH
    By krpandrei in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2012, 10:21 AM
  7. [SOLVED] comparing two columns & then perform a calculation
    By dazp1970 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2005, 09:05 AM

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