+ Reply to Thread
Results 1 to 7 of 7

VBA to copy/paste from Sheet1 to Sheet2 if criteria is met

  1. #1
    Registered User
    Join Date
    05-22-2020
    Location
    Midlands, England
    MS-Off Ver
    2016
    Posts
    12

    VBA to copy/paste from Sheet1 to Sheet2 if criteria is met

    Hello, I am new to all VBA world and I donīt know how to start with a project where I want some values that are already set up in 1 sheet to be copied and pasted in another sheet provided the Criteria from Columns B & C from Sheet2 (both simultaneously) are met.

    In Sheet1 I have pre-added the content I would like to be copied and pasted in Sheet2 if Criteria is met. Additionally, where criteria are met more than once, it will need to copy and paste alternative values that also met the same criteria. As you can see in in Sheet1 I already have the content that I need to copy on Sheet2. I would like to create an Excel Macro that would do this automatically.

    I have attached a Workbook that including the Sheets mentioned above.
    Thanks a lot in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: VBA to copy/paste from Sheet1 to Sheet2 if criteria is met

    Hope you are on Windows version.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-22-2020
    Location
    Midlands, England
    MS-Off Ver
    2016
    Posts
    12

    Re: VBA to copy/paste from Sheet1 to Sheet2 if criteria is met

    Thanks jindon for the quick reply. It worked perfectly well with the example provided. I also tried to loop the process and replicate it for 2 teams during 2 days (I attached the example), but it seems Loop option does not match with the code and it crashes.
    I would appreciate if you could help me with this one.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: VBA to copy/paste from Sheet1 to Sheet2 if criteria is met

    What's your expected result?

  5. #5
    Registered User
    Join Date
    05-22-2020
    Location
    Midlands, England
    MS-Off Ver
    2016
    Posts
    12
    Quote Originally Posted by jindon View Post
    What's your expected result?
    The idea was to update all the breaks for the teams simultaneously for 2 days regardless of the starting and ending time

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: VBA to copy/paste from Sheet1 to Sheet2 if criteria is met

    So all the table should be the same?

    Is so, copy the 1st table to the other ones.

    Is that correct?

  7. #7
    Registered User
    Join Date
    05-22-2020
    Location
    Midlands, England
    MS-Off Ver
    2016
    Posts
    12

    Re: VBA to copy/paste from Sheet1 to Sheet2 if criteria is met

    The variables of the other tables may differ from one to others.

+ 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: 14
    Last Post: 07-14-2019, 04:35 AM
  2. Copy & Paste from Sheet1 to Sheet2
    By Spikyd in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-17-2018, 03:35 AM
  3. Copy/Paste Data from Sheet1 to Sheet2
    By h.noor in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-11-2015, 11:39 PM
  4. Replies: 6
    Last Post: 07-25-2013, 02:58 PM
  5. [SOLVED] Copy and Paste Entire Row from Sheet1->Sheet2 based on text string match in Sheet1 Row
    By dmlovic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-17-2012, 08:42 AM
  6. Copy 3 cells from sheet1 then paste to sheet2
    By Christeen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-10-2011, 09:16 AM
  7. Copy cells sheet1, paste to sheet2
    By Flintstone in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-17-2005, 04:21 PM

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