What is "UsedRange"???

teebruin

New Member
Joined
Mar 28, 2002
Messages
38
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
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
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".
 
Upvote 0
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.
 
Upvote 0
Re: What is "UsedRange"???

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

Forum statistics

Threads
1,213,537
Messages
6,114,216
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top