Consulting

Results 1 to 3 of 3

Thread: Compare 4 columns & find dissimilar

  1. #1

    Compare 4 columns & find dissimilar

    I have 2 spreadsheets with 2 columns in each that I need to compare. Sheet A has a part and a price column, as does Sheet B. I need to compare the part column in A to B and then the price column in A to B and if the price of the part in A is different than the price of the part in B, I need to calculate the difference in a separate column. Can anyone help?

  2. #2
    Moderator VBAX Master georgiboy's Avatar
    Joined
    Mar 2008
    Location
    Kent, England
    Posts
    1,198
    Location
    Something like this...
    Attached Files Attached Files
    Click here for a guide on how to add code tags
    Click here for a guide on how to mark a thread as solved
    Click here for a guide on how to upload a file with your post

    Excel 365, Version 2403, Build 17425.20146

  3. #3
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    If the part is not available then it will give you #N/A. If you would like to add condition for not found parts then use:
    =IF(ISERROR(VLOOKUP(A2,Sheet2!A:B,2,FALSE)),"NOT FOUND",(B2-VLOOKUP(A2,Sheet2!A:B,2,FALSE)))
    Regards,
    --------------------------------------------------------------------------------------------------------
    Shrivallabha
    --------------------------------------------------------------------------------------------------------
    Using Excel 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •