+ Reply to Thread
Results 1 to 3 of 3

Copy and paste row from different tab based on 2 different criteria, assign to button

  1. #1
    Registered User
    Join Date
    12-06-2009
    Location
    B.C., Canada
    MS-Off Ver
    Excel 2007
    Posts
    5

    Copy and paste row from different tab based on 2 different criteria, assign to button

    I have seen a few threads close to my issue, but I have not been able to frankenstein the macros to work for me.

    Looking to see if someone can help with the following issue:

    Sheet 2 contains a drop down list containing names, would like to assign a Macro to a button on same sheet that would refer to sheet 3 based on certain criteria.

    Sheet 3 contains columns A - K of data. 2 criteria, data in column D and column K. Column D would be the same as names in the drop down list, whereas column K refers to a constant, either y or n.

    Example: If D contains "Cheddar" and K contains "Y", copy and paste A:K to Sheet1, preferably starting at row 7.

    Thank you for any assistance

    Andrew
    Attached Files Attached Files
    Last edited by AndrewL; 02-13-2014 at 05:24 AM. Reason: Did not add a thank you at the end

  2. #2
    Registered User
    Join Date
    12-06-2009
    Location
    B.C., Canada
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Copy and paste row from different tab based on 2 different criteria, assign to button

    As per Forum Rules, "Bump no response"

    Andrew

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: Copy and paste row from different tab based on 2 different criteria, assign to button

    Try this:

    Please Login or Register  to view this content.

    EDIT: Updated code to make cheese selection variable.
    You will have to attach this code to your button and change the sub title to the command button.
    Last edited by alansidman; 03-09-2014 at 01:03 AM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    12-06-2009
    Location
    B.C., Canada
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Copy and paste row from different tab based on 2 different criteria, assign to button

    You sir, are Captain Awesome. This is perfect. Thank you, thank you, thank you!!!! A few tweeks, and it works for my sheet.

    Andrew

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 10-29-2013, 09:38 AM
  2. Copy and Paste Rows based on Criteria onto another sheet and sort based on oldest item
    By Kushal8684 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2013, 05:37 AM
  3. [SOLVED] Copy, paste data based on a particular criteria
    By bonny24tycoon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-01-2012, 03:08 PM
  4. Copy and Paste Based on Criteria
    By jadown in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-24-2011, 04:14 PM
  5. Transfer Copy/paste based on criteria
    By chris100 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-06-2010, 02:43 AM

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