+ Reply to Thread
Results 1 to 2 of 2

Copy rows from one worksheet to another based on satisfying criteria using VBA

  1. #1
    Registered User
    Join Date
    05-25-2016
    Location
    Glasgow, Scotland
    MS-Off Ver
    2010
    Posts
    1

    Unhappy Copy rows from one worksheet to another based on satisfying criteria using VBA

    Hello,

    I am having problems writing a code to copy the rows from one worksheet to another, if certain criteria are met.

    A data dump is taken from a report and copied into worksheet "a" (starting at C5 due to column headings etc), then in worksheet "b" I need to, on the pressing of a command button, delete the current data in worksheet "b" (C5:Z21000), and pull through data from worksheet "a" (C5:Z21000) if the code number in Column P ends with a ".99" (example code: AB.CD.01.99) and if Column S is NOT populated.

    The reason for the deleting of data first is that the only the current/live ".99" rows need to be copied through, and if Column S is populated or the code number has changed, then the actions against the rows have been completed.

    It is not essential, but would be super helpful if the code could only bring through Columns CDEFGHIPQRST and put them in CDEFGHIJKLMN.

    Many thanks in advance.

    alisun125

  2. #2
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Copy rows from one worksheet to another based on satisfying criteria using VBA

    Hi,
    In future it is best to attach a sample sheet.
    I believe this is what you are after:

    Please Login or Register  to view this content.
    Regards,
    Stephen

    If you feel someone has helped you please thank them and click on the star on their post to add reputation.
    Please ensure that you use code tags where relevant, and mark solved threads as solved.
    Most of all please be respectful and understanding of 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. macro to copy rows to a new worksheet based on criteria
    By hiswillbedun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2015, 07:26 PM
  2. How to copy rows based on multiple criteria from one worksheet to another ?
    By Caster in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2015, 06:27 AM
  3. [SOLVED] Copy rows from one worksheet into another based on single criteria
    By OLLY-7 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-23-2014, 11:49 AM
  4. [SOLVED] Copy rows from one worksheet to another worksheet based on a cell criteria.
    By keneco in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-07-2013, 10:28 AM
  5. Replies: 5
    Last Post: 06-08-2012, 11:26 PM
  6. Copy rows from one worksheet to another based on date criteria
    By jo74 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-23-2012, 11:29 PM
  7. Replies: 0
    Last Post: 05-16-2011, 10:30 AM

Tags for this Thread

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