+ Reply to Thread
Results 1 to 2 of 2

Copy range, stopping at blank rows

  1. #1
    Registered User
    Join Date
    03-26-2020
    Location
    Lansing, MI
    MS-Off Ver
    365
    Posts
    3

    Copy range, stopping at blank rows

    Hello,

    I am writing a script that copies a range from a spreadsheet, but the range could change between the number of lines it exports based on data. I.E. I could have 10 rows or I could have 38 rows. It's going to copy, because my users will use it to paste the data into a different program that unfortunately would not strip out the blank rows. I have the easy part:

    Please Login or Register  to view this content.
    I just need the code to stop it when it hits a blank row. Can you help?
    Last edited by jeffreybrown; 03-27-2020 at 10:21 AM. Reason: Please use code tags!

  2. #2
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Copy range, stopping at blank rows

    Not enough data.
    I don't know if there are only values or formulas in the cells?
    For "values only" please download the code below.
    The results are from L2.

    P.S. It's a good idea to attach the workbook.
    Please Login or Register  to view this content.
    Best Regards,
    Maras.

+ 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. [SOLVED] copy values down to all blank cells stopping when full row is blank.
    By fireguy7 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-12-2018, 02:35 PM
  2. Copy non blank rows from the range specified
    By drgkt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-31-2017, 02:32 PM
  3. Replies: 3
    Last Post: 01-09-2017, 05:22 PM
  4. Copy range into every 2nd of a pair of blank rows.
    By and351 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2015, 11:02 AM
  5. Copy and paste non blank rows from a range
    By mcinnes01 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 10-12-2010, 09:29 AM
  6. Copy range without blank rows
    By HuskerBronco in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2010, 01:38 PM
  7. remove blank rows and copy new range
    By twofootgiant in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2010, 09:11 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