+ Reply to Thread
Results 1 to 8 of 8

VB to copy rows from 1 sheet to another sheet

  1. #1
    Registered User
    Join Date
    08-30-2016
    Location
    Dallas, Texas
    MS-Off Ver
    excel 2013
    Posts
    71

    VB to copy rows from 1 sheet to another sheet

    Hi All,

    Been a few years since I posted here. I have zero experience with VB Macros. I need to copy a row (A2-H2) sheet "Master" to sheet "Spanish" if cell D2="Spanish", however I don't want cell D2 to copy over to sheet "Spanish". If cell D2 does not equal "Spanish", then I do not want any of the row to be copied over from "Master" to "Spanish". I have browsed this section, but I'm having a hard time understanding the coding to make this happen. Attached is the workbook for this project. Any help and education you are willing to provide would be most appreciated. Thank you.
    Attached Files Attached Files
    Last edited by RickMcc; 11-25-2020 at 10:18 AM.

  2. #2
    Registered User
    Join Date
    08-30-2016
    Location
    Dallas, Texas
    MS-Off Ver
    excel 2013
    Posts
    71

    Re: VB to copy rows from 1 sheet to another sheet

    Of course after I post, I had 2 additional thoughts.

    1. Would it be easier to go ahead and copy cell D2 over, and just hide column D
    2. I don't even know where I would insert the Macros to make this happen

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,162

    Re: VB to copy rows from 1 sheet to another sheet

    Do you want to press a button or have it happen immediately on entering Spanish in D2

    Immediately...This code in master sheet Module
    When "Spanish" is entered into [D2], [A2:H2] excluding [D2] will be copied...
    Please Login or Register  to view this content.
    Why only row 2 by the way?
    Last edited by sintek; 11-25-2020 at 10:06 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Registered User
    Join Date
    08-30-2016
    Location
    Dallas, Texas
    MS-Off Ver
    excel 2013
    Posts
    71

    Re: VB to copy rows from 1 sheet to another sheet

    Sorry my fault for not being clear. I want it happen automatically, and for all rows. I just gave row 2 as an example. Again my apologies

  5. #5
    Registered User
    Join Date
    08-30-2016
    Location
    Dallas, Texas
    MS-Off Ver
    excel 2013
    Posts
    71

    Re: VB to copy rows from 1 sheet to another sheet

    Thank tyou for your quick response

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,162

    Re: VB to copy rows from 1 sheet to another sheet

    Thought so...

    Edit....Forgot most important snippet in red...


    Please Login or Register  to view this content.
    Last edited by sintek; 11-25-2020 at 10:55 AM.

  7. #7
    Registered User
    Join Date
    08-30-2016
    Location
    Dallas, Texas
    MS-Off Ver
    excel 2013
    Posts
    71

    Re: VB to copy rows from 1 sheet to another sheet

    Awesome! Thank you!

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,162

    Re: VB to copy rows from 1 sheet to another sheet

    ..........................
    =THANKS.gif

+ 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. VBA to copy all rows in any sheet with 1 in column A and copy entire row to specific sheet
    By Lazarus Rises in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-21-2020, 02:17 AM
  2. Automatically copy rows to another sheet based on criteria, when original sheet is updated
    By NoviceProgrammer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-29-2016, 02:14 AM
  3. Replies: 2
    Last Post: 04-16-2014, 07:19 PM
  4. Copy diff cells of a sheet & paste in a NEW row below previously filld rows of other sheet
    By shubhashishdubey in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-27-2014, 12:36 AM
  5. Replies: 1
    Last Post: 01-07-2013, 12:23 AM
  6. [SOLVED] Copy row from sheet 1 to next row in sheet 2. delete from sheet 1 and move rows up
    By papabob1954 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-16-2012, 09:38 PM
  7. Macro: Count rows in sheet A, copy count in sheet B, paste offset in sheet A
    By Agent:Orange in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-19-2011, 07:56 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