+ Reply to Thread
Results 1 to 7 of 7

Finding Matching Values in Separate Sheets and Copying Accompanying Data

  1. #1
    Forum Contributor
    Join Date
    05-24-2012
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2007
    Posts
    113

    Finding Matching Values in Separate Sheets and Copying Accompanying Data

    So, I'm working with 2 different reports.

    Sheet 1, Column A has product models numbers
    Sheet 2, Column A, has most of the exact same model numbers

    Sheet 1, Column B has a QTY count
    Sheet 2, Column B does not have a QTY count

    I would like to:
    Copy the QTY count from Sheet 1 Column B
    to Sheet 2 Column B as long as it corresponds to the same model number

    So for example:
    If Sheet 1 Column A contains the model number "32LK" in cell A6
    And Sheet 1 Column B contains the QTY 15 in cell B6

    And Sheet 2 Column A contains the model number "32LK" in cell A14
    Then I would like the QTY of 15 copied into Sheet 2 cell B14


    This will need to check for all matching model numbers in both columns in both sheets and copy all applicable QTY values accordingly as stated above.


    Really struggling to find a solution here, so help would be EXTREMELY appreciated!


    Thanks in advance

  2. #2
    Registered User
    Join Date
    05-24-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Finding Matching Values in Separate Sheets and Copying Accompanying Data

    This is all you need to do; paste this in sheet 2 column B:

    Please Login or Register  to view this content.
    What this does is looks up the value in Sheet2 A1 in Sheet1 column A and spits out the value in Sheet1 column B that corresponds to it. You could also use the INDEX or VLOOKUP functions.

  3. #3
    Forum Contributor
    Join Date
    05-24-2012
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2007
    Posts
    113

    Re: Finding Matching Values in Separate Sheets and Copying Accompanying Data

    Hi Erok,

    I tried that, but the values that I'm now seeing in Sheet 2 Column B look like gibberish.
    Sheet 2 Column B is populated with values now, but every other value is a 0 (when I don't have any 0 QTY's), some are negative (when no negative qty's should exist), and the remaining values are all duplicates of one another (for example, qty of 694 and 730 appear repeatedly).

    I was supposed to copy/paste that equation in Sheet 2 Cell B1, and then drag down across Column B correct?

    Please see attached image for an exmaple:
    s2wc.JPG
    Last edited by hamidxa; 05-24-2012 at 06:55 PM.

  4. #4
    Forum Contributor
    Join Date
    05-24-2012
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2007
    Posts
    113

    Re: Finding Matching Values in Separate Sheets and Copying Accompanying Data

    S1.JPG Sheet 1: Column A = Model # , Column B = QTY
    S2.JPG Sheet 2: Column A = Model # , Column B = where I would like to have qty's appear for matching model #s

    As can be seen, I've reverted back to a blank column B in Sheet 2.
    The attached images are basically what my 2 sheets look like at the moment without any code/equations in them.
    Last edited by hamidxa; 05-24-2012 at 06:58 PM.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Finding Matching Values in Separate Sheets and Copying Accompanying Data

    Hamidxa,

    You have created 2 more duplicate threads in addition to this one. This is against the rules. I have closed the other 2. Please continue in this thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  6. #6
    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
    48,188

    Re: Finding Matching Values in Separate Sheets and Copying Accompanying Data

    @hamidxa: and, to highlight the problem, you have had different answers from different people in each of the threads. So, have a look at the other threads and, in future, please don't waste everyone's time. It is far better if we are all aware of the solutions posed.

    @arlette: thanks for putting the brake on.
    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


  7. #7
    Registered User
    Join Date
    05-24-2012
    Location
    Bombay
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Finding Matching Values in Separate Sheets and Copying Accompanying Data

    Hi,

    I tried this formula and its working fine. Incase the Sheet2 has values that are not found in Sheet 1 it returns incorrect results.
    Secondly when you paste the formula and drag it to the below rows, just check if the formula is automatically modified correctly. Only the loopup value will change for each row.
    Thanks
    Deepal

+ 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