+ Reply to Thread
Results 1 to 13 of 13

Copying values from matched rows

Hybrid View

  1. #1
    Registered User
    Join Date
    01-21-2009
    Location
    Ireland
    MS-Off Ver
    Excel 2000
    Posts
    12

    Copying values from matched rows

    I'm working on a project requiring the matching of data from multiple worksheets and got some useful advice from someone on here a few months ago to get it up and running.

    At the moment I'm using SUMPRODUCT with an IF argument to check rows on one sheet for matches on 5 others and return a "Yes" or "No" value, which is working fine. The next bit of analysis however requires copying the value from another column on rows that match, and pasting it into the first sheet.

    =IF(SUMPRODUCT(--('Sheet2'!$B$2:$B$108=C2),--('Sheet2'!$I$2:$I$108=J2))>=1,"Yes","No")
    What I need to insert into the formula above is something like:

    THEN copy $Level from CurrentRowSheet2, paste $Level CurrentRowSheet1
    Hope that makes sense! I'd appreciate any advice as to whether this functionality can be shoehorned into what I have, or if something like INDEX/MATCH might be more appropriate.

    If any more details are required, please let me know, I'd be grateful for any help.
    Last edited by seaweasel; 06-22-2009 at 02:50 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Copying values from matched rows

    A visual sample (like a sample spreadsheet) may help to see what is the best option...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    01-21-2009
    Location
    Ireland
    MS-Off Ver
    Excel 2000
    Posts
    12

    Re: Copying values from matched rows

    I've attached a sample sheet with a working version of the formula I've used so far.
    Attached Files Attached Files

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Copying values from matched rows

    Try:

    =INDEX(Sheet2!C$2:C$8,MATCH(1,(Sheet2!$A$2:$A$8=$A2)*(Sheet2!$B$2:$B$8=$B2),0))

    confirmed with CTRL+SHIFT+ENTER not just ENTER... and copied down and across...

    Non-matches will return #N/A

    or try

    =INDEX(Sheet2!C$2:C$8,MATCH(1,INDEX((Sheet2!$A$2:$A$8=$A2)*(Sheet2!$B$2:$B$8=$B2),0),0))

    Confirmed with ENTER only...
    Last edited by NBVC; 06-22-2009 at 04:40 PM.

  5. #5
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Copying values from matched rows

    NBVC,
    by some reasons when I try your formula I get Non-Advanced in all cells?!
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Copying values from matched rows

    Which formula? I tested both and got expected results...

    The 1st formula requires CSE confirmation!

  7. #7
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Copying values from matched rows

    nevermid
    i'm tired a bit today
    sorry

  8. #8
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Copying values from matched rows

    nbvs
    CAN U POST WORKBOOK?

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Copying values from matched rows

    It's NBVC, by the way...

    See attached...
    Attached Files Attached Files

  10. #10
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Copying values from matched rows

    NBVC,
    So why when I trying your formula I get "Non-Advanced" in all cells. I really dont know why?!
    Thats why a was amazed when u told me that you're getting expected results...
    Last edited by contaminated; 06-29-2009 at 05:02 PM.

  11. #11
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Copying values from matched rows

    maybe something is unticked in options...

  12. #12
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Copying values from matched rows

    Yep
    I had manual calculations instead od automatic...

  13. #13
    Registered User
    Join Date
    01-21-2009
    Location
    Ireland
    MS-Off Ver
    Excel 2000
    Posts
    12

    Re: Copying values from matched rows

    Thanks NBVC, worked a treat!

+ 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