+ Reply to Thread
Results 1 to 3 of 3

Macro to copy row based on criteria...not entirely working

  1. #1
    Registered User
    Join Date
    03-26-2015
    Location
    Florida
    MS-Off Ver
    Office 2007
    Posts
    25

    Macro to copy row based on criteria...not entirely working

    I have a macro that I adapted to what I needed, but only to a certain degree. The macro searches column "A" for certain numbers (nothing hard, it's like: 10, 12, 14, 16 etc.) and then copies the respective row to another sheet in the same workbook. It works great, except that the report it is scanning has two lines in between certain groups of data and once this macro hits a blank line, it ends. I'm pasting the code below in hopes of finding a way to ignore the blank lines and continuing to run. Maybe I can get something that will find the last line so it knows where to end? I'm not really sure, i'm pretty stumped here. Any help would be greatly appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Macro to copy row based on criteria...not entirely working

    So actually you don't need to evaluate every single row like your code is doing. Just search for "10" and copy the rows that have it.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-26-2015
    Location
    Florida
    MS-Off Ver
    Office 2007
    Posts
    25

    Re: Macro to copy row based on criteria...not entirely working

    That worked perfectly! Thank you so much for the help.

+ 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. Excel VBA MAcro to copy based on criteria
    By rshnkmr39 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-06-2014, 11:12 AM
  2. VBA code not working for copy and pasting data based on criteria.
    By harkin123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-16-2013, 04:55 AM
  3. [SOLVED] macro to copy/paste based on a criteria
    By winger in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-27-2012, 09:55 AM
  4. macro to copy rows based on criteria
    By arnab0711 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2011, 11:10 AM
  5. Macro to copy rows based on a given criteria
    By Roop in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-13-2011, 04:16 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