+ Reply to Thread
Results 1 to 4 of 4

Copy rows to new sheet based on value in Column 1

  1. #1
    Registered User
    Join Date
    12-05-2012
    Location
    Evergreen, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    5

    Copy rows to new sheet based on value in Column 1

    Good morning,

    I have cobbled together some code to copy rows of one worksheet to the first blank row of another worksheet if there is a "Yes" in Column 1. However, I don't want to copy all the columns. There are 33 columns and I only want to copy Columns 2-30.

    What do I need to change in my code (below)?

    Any help is very much appreciated!!


    Please Login or Register  to view this content.
    Last edited by arlu1201; 02-12-2013 at 09:15 AM. Reason: Code tags

  2. #2
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Copy rows to new sheet based on value in Column 1

    Hey lzrdlvr,

    please use code tags for better readability!

    As for you problem, using this line
    Please Login or Register  to view this content.
    instead of these 2 lines
    Please Login or Register  to view this content.
    should solve your problem. Btw you have a lot of select statements in your code, which are not quite necessary and slow down the procedure. Consider eliminating them.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy rows to new sheet based on value in Column 1

    lzrdlvr,

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature below this post.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Registered User
    Join Date
    12-05-2012
    Location
    Evergreen, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Copy rows to new sheet based on value in Column 1

    Ah, I see. Thank you so much RHCPgergo!

    I apologize for not including code tags and will do so in the future...

+ 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