+ Reply to Thread
Results 1 to 3 of 3

How to compare columns of data between two worksheets and replace with adjacent data?

  1. #1
    Registered User
    Join Date
    02-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    How to compare columns of data between two worksheets and replace with adjacent data?

    I need a function that compares data on one worksheet to data in a second worksheet and if it finds a match, replace adjacent data in the first worksheet with the matching adjacent data in the second worksheet. I have a list of UPCs on Sheet1, and a shorter list of UPCs on Sheet2. Sheet1 has incorrect pricing, while Sheet2 has correct pricing. I need Excel to compare UPCs from Sheet1 to the UPCs in Sheet2, and ,if it finds a match, replace the adjacent price in Sheet1 with the adjacent price in Sheet2. If someone could explain how that is done it will seriously, seriously make my day.

  2. #2
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: How to compare columns of data between two worksheets and replace with adjacent data?

    VLOOKUP. See attached. Sheet 1 has a list of UPCs. Sheet 2 has a shorter list.
    Column C of sheet 1 uses VLOOKUP to select the price off sheet 2 ,where it exists. Where it doesn't, it returns #N/A.
    Attached Files Attached Files
    Kind Regards,

    Out of the Hat

    "Computers are stupid - they do EXACTLY what you tell them to"

    If I've helped you with a problem, please say thanks by clicking the small star icon on the left.

  3. #3
    Registered User
    Join Date
    02-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: How to compare columns of data between two worksheets and replace with adjacent data?

    Quote Originally Posted by outofthehat View Post
    VLOOKUP. See attached. Sheet 1 has a list of UPCs. Sheet 2 has a shorter list.
    Column C of sheet 1 uses VLOOKUP to select the price off sheet 2 ,where it exists. Where it doesn't, it returns #N/A.
    You, sir, are a saint. Thanks so much.

+ 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