What is "UsedRange"???
What is "UsedRange"???
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: What is "UsedRange"???

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I am looking at some VBA code in an excel macro, and I was hoping that someone could explain to me what UsedRange is.

    The particular line of code is:

    Set Rng = ActiveSheet.UsedRange.Rows

  2. #2
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    UsedRange returns a rectangular range which goes from the upper left populated cell in the spreadsheet, to the lower right populated cell.

    e.g. if A1 has "1" in it and C6 has "4" in it, the used range will return the range "A1:C6".

  3. #3
    New Member
    Join Date
    Mar 2002
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks a bunch, that helped.

  4. #4

    Join Date
    Apr 2002
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-18 10:22, Mark O'Brien wrote:
    UsedRange returns a rectangular range which goes from the upper left populated cell in the spreadsheet, to the lower right populated cell.

    e.g. if A1 has "1" in it and C6 has "4" in it, the used range will return the range "A1:C6".

    The top left and bottom right cells of the used range are not necessarily populated.

    The top left cell is the intersection of the first used column and the first used row.

    The bottom right cell is the intersection of the last used column and the last used row.


  5. #5
    New Member
    Join Date
    Dec 2014
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: What is "UsedRange"???

      
    The difference of currentrange and usedrange is cells are populated in currentrange but not necessarily in usedrange?

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com