+ Reply to Thread
Results 1 to 7 of 7

Match (2 criteria) then copy paste

  1. #1
    Forum Contributor
    Join Date
    08-01-2012
    Location
    rotterdam, holland
    MS-Off Ver
    Excel 2013
    Posts
    170

    Match (2 criteria) then copy paste

    I want to match my database with 2 criteria, in columns AB and AC with the range columns A and B.
    If they match, it should copy and paste the corresponding columns from my database to the range. It should copy and paste when match, like lets say AD6 in D10 and AE6 in E10.
    I want the other formulas in the columns A:F to be intact, I want it to just paste the times in the matching name and date.

    I made this up but its rubbish.
    Anyone a batter macro? Thanks a lot.


    test2 - Copy.xlsm

    Please Login or Register  to view this content.
    Last edited by IKZOUHETNIETWETEN; 05-13-2013 at 04:53 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Match (2 criteria) then copy paste

    copied from the forumrules.

    http://www.excelforum.com/forum-rule...rum-rules.html

    . Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Select your code and click the [#] button at the top of the post window (if you are editing an existing post, press Go Advanced to see the [#] button). The result will appear like this in the post window:

    Please Login or Register  to view this content.
    ... and appear like this when posted:


    copy to clipboard
    your code here ...
    and here ...
    and hereYou can also type the code tags in manually if you prefer. For more information about these and other tags, click here.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Match (2 criteria) then copy paste

    I hope this one works, as nothing seems to work for me all day
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    08-01-2012
    Location
    rotterdam, holland
    MS-Off Ver
    Excel 2013
    Posts
    170

    Re: Match (2 criteria) then copy paste

    Damn, thats pretty nice ! Even all ma formulas are intact when running that macro, great job! +Rep for u.

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Match (2 criteria) then copy paste

    This is the only thread I have got it right all day. "There may be light at the end of the day".

    Thank you very much for lifting my sprit!

  6. #6
    Forum Contributor
    Join Date
    08-01-2012
    Location
    rotterdam, holland
    MS-Off Ver
    Excel 2013
    Posts
    170

    Re: Match (2 criteria) then copy paste

    You used this code. works fine in the attachment. But what if I want to place my database at AC:AF (now its AB:AE) ? I change the AB6 to AC6, but that doesnt make the macro work for some reason.. give an array error, see attachment.

    test2wwwwww - Copy.xlsm



    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Match (2 criteria) then copy paste

    Please Login or Register  to view this content.

+ 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