+ Reply to Thread
Results 1 to 4 of 4

Copy row if condition is true, but how to copy and past only the cells that have data.

  1. #1
    Registered User
    Join Date
    01-25-2018
    Location
    Southeast
    MS-Off Ver
    2016
    Posts
    19

    Copy row if condition is true, but how to copy and past only the cells that have data.

    My sheets has a list of products that need to copy to a 2nd sheet IF there is a quantity > 0 in the Col C cell for the product. I HAVE GOTTEN THIS TO WORK.

    HOWEVER when the macro below selects, copies, & pasts that row it does so for the entire row on to infinity. I would like to copy only range A:E if column C has a quantity > 0.

    I have a macro that copies and moves but would like to alter it so that it isnt pasting to the entire row on the 2nd (target) sheet.

    Thanks!!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,498

    Re: Copy row if condition is true, but how to copy and past only the cells that have data.

    This

    Please Login or Register  to view this content.
    should replace this

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-25-2018
    Location
    Southeast
    MS-Off Ver
    2016
    Posts
    19

    Re: Copy row if condition is true, but how to copy and past only the cells that have data.

    Thanks Jolivanes! Its working except any data to the right of the pasted rows in sheets(2) is still being replaced. I have it implemented as below.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-25-2018
    Location
    Southeast
    MS-Off Ver
    2016
    Posts
    19

    Re: Copy row if condition is true, but how to copy and past only the cells that have data.

    Please disregard my initial reply. I've found its somewhere else in my macro that's causing the replacement of the data. Your code has fulfilled my initial request.

    Thank you very much

+ 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. copy the intersection of selected cells and past delimition then copy results to another
    By hassan khansa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2017, 04:57 PM
  2. When condition true copy past values only.
    By nnish in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2017, 12:44 PM
  3. how to copy data from the textbox if condition is true or false???
    By clinton96 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-03-2016, 03:03 AM
  4. Replies: 1
    Last Post: 03-09-2016, 03:57 AM
  5. Copy the values from A column and past into new work book based on condition
    By akmughal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-30-2015, 03:43 PM
  6. [SOLVED] Copy all row if condition is true
    By norlax in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-13-2014, 12:01 PM
  7. Copy data from one cell to another if a blank condition is true
    By gadjit in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-08-2009, 08:17 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