+ Reply to Thread
Results 1 to 13 of 13

Match Cells across 2 Work sheets then copy/paste a cell

  1. #1
    Registered User
    Join Date
    10-18-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    29

    Match Cells across 2 Work sheets then copy/paste a cell

    Hey guys, I've been searching for a couple hours now trying to figure this out. Run down:

    Got two Worksheets. Worksheet2 has extra information I'd like to copy over to Worksheet1. I'd like to match a number in column A of both worksheets. If there's a match, then I'd like to copy a cell in that row of Worksheet2 and paste it into a cell in WorkSheet1. Not sure why I haven't been able to find an answer. At first, I was strictly looking at macros, but then found other posts about Vlookups... but for some reason I just can't get it to work. Attached is a sample workbook as the original one has over 60,000 items.

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-18-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Match Cells across 2 Work sheets then copy/paste a cell

    Oops, I forgot to mention that the UOM in Worksheet2 is what I want to copy to Column E in Worksheet1. Sorry

  3. #3
    Forum Contributor
    Join Date
    04-23-2013
    Location
    Abu Dhabi United Arab Emirates
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: Match Cells across 2 Work sheets then copy/paste a cell

    try this:
    =VLOOKUP(A2,Sheet2!$A$2:$B$9,2,FALSE

    it will give 0 values if the result column was blank but try to input some data on the price and see what happen

  4. #4
    Forum Contributor
    Join Date
    04-23-2013
    Location
    Abu Dhabi United Arab Emirates
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: Match Cells across 2 Work sheets then copy/paste a cell

    try this:
    =VLOOKUP(A2,Sheet2!$A$2:$B$9,2,FALSE

    it will give 0 values if the result column was blank but try to input some data on the price and see what happen

  5. #5
    Forum Contributor
    Join Date
    04-23-2013
    Location
    Abu Dhabi United Arab Emirates
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: Match Cells across 2 Work sheets then copy/paste a cell

    try this
    =VLOOKUP(A2,Sheet2!$A$1:$H$9,8,FALSE)

  6. #6
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Match Cells across 2 Work sheets then copy/paste a cell

    hi tripey, welcome to the forum, you can try this in Sheet1!E2:
    =VLOOKUP(A2,Sheet2!$A$2:$H$9,MATCH(E$1,Sheet2!$A$1:$H$1,0),0)

    or just this if UOM is the only item you need:
    =VLOOKUP(A2,Sheet2!$A$2:$H$9,8,0)

    if you have instances where SKU cannot be found, cover it with IFERROR:
    =IFERROR(VLOOKUP(A2,Sheet2!$A$2:$H$9,8,0),"")

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  7. #7
    Registered User
    Join Date
    10-18-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Match Cells across 2 Work sheets then copy/paste a cell

    Thanks guys, I'm checking this out right now. So far the formula, =VLOOKUP(A2,Sheet2!$A$2:$H$9,8,FALSE) works for the small sample file I uploaded, but I'm still getting #N/A on the larger file that I need it to work on. Might attach a condensed version of the file for you guys to look at.

  8. #8
    Forum Contributor
    Join Date
    04-23-2013
    Location
    Abu Dhabi United Arab Emirates
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: Match Cells across 2 Work sheets then copy/paste a cell

    it gives you an #N/A because cannot find the lookup value from the range, but you can alter the #N/A by displaying space when the lookup not find anything, you may modify the formula:
    1. =IFERROR(VLOOKUP(A2,Sheet2!$A$2:$H$9,8,0),"")
    2. = if(iserror((VLOOKUP(A2,Sheet2!$A$2:$H$9,8,0)),"",(VLOOKUP(A2,Sheet2!$A$2:$H$9,8,0))
    both will work

  9. #9
    Registered User
    Join Date
    10-18-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Match Cells across 2 Work sheets then copy/paste a cell

    Yep, not sure why it's working in the sample file I initially uploaded but not in the actual file I'm working on. Here's a condensed version of it.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-18-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Match Cells across 2 Work sheets then copy/paste a cell

    I know, but for some reason it doesn't work with the actual file that I need it to work on. I just uploaded a smaller version of it . In it, there are two skus that will match in both worksheets, but it still can't find the lookup value. I've been at this for a couple hours now, wondering if it's something with the file settings.

    Thanks man


    Quote Originally Posted by acerrhod View Post
    it gives you an #N/A because cannot find the lookup value from the range, but you can alter the #N/A by displaying space when the lookup not find anything, you may modify the formula:
    1. =IFERROR(VLOOKUP(A2,Sheet2!$A$2:$H$9,8,0),"")
    2. = if(iserror((VLOOKUP(A2,Sheet2!$A$2:$H$9,8,0)),"",(VLOOKUP(A2,Sheet2!$A$2:$H$9,8,0))
    both will work

  11. #11
    Forum Contributor
    Join Date
    04-23-2013
    Location
    Abu Dhabi United Arab Emirates
    MS-Off Ver
    Excel 2010
    Posts
    178

    Re: Match Cells across 2 Work sheets then copy/paste a cell

    The date from column A Sheet1 was a text value and the data in column A in sheet was a number value, that is why it giving #n/a but you may modified the formula by:
    =VLOOKUP(VALUE(A22),Sheet2!$A$2:$H$23,8,0)

    try if it working
    and to alter the #n/a if no found data

    =IFERROR(VLOOKUP(VALUE(A22),Sheet2!$A$2:$H$23,8,0),"")

  12. #12
    Registered User
    Join Date
    10-18-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Match Cells across 2 Work sheets then copy/paste a cell

    Oh!!! the data type was different that's why it's not matching! I see, I'll get back at it right now.

    Thanks



    Quote Originally Posted by acerrhod View Post
    The date from column A Sheet1 was a text value and the data in column A in sheet was a number value, that is why it giving #n/a but you may modified the formula by:
    =VLOOKUP(VALUE(A22),Sheet2!$A$2:$H$23,8,0)

    try if it working
    and to alter the #n/a if no found data

    =IFERROR(VLOOKUP(VALUE(A22),Sheet2!$A$2:$H$23,8,0),"")
    Last edited by tripey; 05-13-2013 at 11:44 PM.

  13. #13
    Registered User
    Join Date
    10-18-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Match Cells across 2 Work sheets then copy/paste a cell

    Awesome, it works. This is my 2nd time messing with excel. Got a lot to learn, thanks man.



    Quote Originally Posted by acerrhod View Post
    The date from column A Sheet1 was a text value and the data in column A in sheet was a number value, that is why it giving #n/a but you may modified the formula by:
    =VLOOKUP(VALUE(A22),Sheet2!$A$2:$H$23,8,0)

    try if it working
    and to alter the #n/a if no found data

    =IFERROR(VLOOKUP(VALUE(A22),Sheet2!$A$2:$H$23,8,0),"")

+ 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