+ Reply to Thread
Results 1 to 3 of 3

How to get the range to the end of the non-empty cell?

  1. #1
    Forum Contributor
    Join Date
    08-01-2016
    Location
    China, beijing
    MS-Off Ver
    2016
    Posts
    114

    How to get the range to the end of the non-empty cell?

    Set rng = ActiveSheet.Range("A1:A_end")

    How to change the expression?

  2. #2
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: How to get the range to the end of the non-empty cell?

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor tax112's Avatar
    Join Date
    02-28-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2016 | 2019
    Posts
    438

    Re: How to get the range to the end of the non-empty cell?

    Quote Originally Posted by woshichuanqilz View Post
    Set rng = ActiveSheet.Range("A1:A_end")

    How to change the expression?
    Try:
    PHP Code: 
    lastRow ActiveSheet.Cells(ActiveSheet.Rows.Count"A").End(xlUp).Row
        Set rng 
    ActiveSheet.Range("A1:A" lastRow

+ 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] 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
  2. Replies: 0
    Last Post: 08-03-2016, 07:01 PM
  3. Replies: 2
    Last Post: 07-21-2016, 09:40 PM
  4. [SOLVED] VBA if cell is empty then range is empty
    By Pierce Quality in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-07-2013, 11:55 AM
  5. [SOLVED] If one cell in range is not empty, the all range must be not empty
    By loroverde in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-02-2013, 03:37 PM
  6. MACRO to empty a range of cells based on whether specified cell is empty
    By TBJV in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2013, 10:35 PM
  7. [SOLVED] Finding next empty empty cell in a range of columns
    By UncleBun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2006, 07:25 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