+ Reply to Thread
Results 1 to 2 of 2

copy dynamic range until next empty cell

  1. #1
    Forum Contributor
    Join Date
    04-04-2016
    Location
    dallas tx
    MS-Off Ver
    365 (15.0.5501.1000)
    Posts
    534

    copy dynamic range until next empty cell

    I have a range of cells I need to copy. there is s blank row underneath the last populated cell of the column and then data I do not need. I have been using range(B3:B) in my copy script but it gets everything in column B including hopping the blank row and getting the data I don't need. How can I stop the dynamic range dead when it hits the empty row?

    Here is a sample of my code.
    Please Login or Register  to view this content.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,164

    Re: copy dynamic range until next empty cell

    Hi chris,

    Have you tried .CurrentRegion yet? It will start with a cell/range and extend until it hits blank row or column.
    This might explain it better:
    https://www.youtube.com/watch?v=DpwAO5qnvAQ&t=222s
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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 and Paste only filled cells from a dynamic range to another sheet in empty cells
    By seanpcorbett1 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-12-2016, 03:23 PM
  2. [SOLVED] How to create a dynamic range if the last cell is empty and the columns have empty cells
    By peter_swe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2016, 11:18 PM
  3. Replies: 0
    Last Post: 08-03-2016, 07:01 PM
  4. [SOLVED] Copy cell range to the last empty raw
    By enetworks in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2014, 02:39 AM
  5. copy range of formulas when cell is empty
    By nikenis in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 07:14 AM
  6. Copy range if the cell is not empty
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-22-2012, 05:43 PM
  7. check if any cell in a dynamic range is empty
    By akabraha in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2008, 04:13 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