ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Worksheet Dimensions (https://www.excelbanter.com/excel-programming/333367-worksheet-dimensions.html)

Paul Ilacqua

Worksheet Dimensions
 
What is the best way to get worksheet dimension for worksheets with non
contiguous rows and columns. The dimensions vary sheet to sheet.

Thanks
Paul



Lorne[_2_]

Worksheet Dimensions
 
Using the keyboard Ctrl-End will go to the bottom right cell in the sheet
(ie lowest row with anything in it and furthest right column with anything
in it, anything being data or a format setting) if that helps you.


"Paul Ilacqua" wrote in message
...
What is the best way to get worksheet dimension for worksheets with non
contiguous rows and columns. The dimensions vary sheet to sheet.

Thanks
Paul




keepITcool

Worksheet Dimensions
 

normally you'd use
..UsedRange.address

note that usedrange includes first to last cell that contains
either data and/or formatting and/or comments.

you can manually check the "last cell" of a sheet by
pressing CtrlEnd. if it is in an "unexpected" location this is probably
due to accidental or remaining formatting. tons of posts on that.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Paul Ilacqua wrote :

What is the best way to get worksheet dimension for worksheets with
non contiguous rows and columns. The dimensions vary sheet to sheet.

Thanks
Paul


Damon Longworth

Worksheet Dimensions
 
What do you mean by "worksheet dimensions"? You want the last used row and
last used column?

You can focus on a row or column that always contains data for each record.
Then you can use something similar to:

range("a65536").end(xlup).row
range("iv1").end(xltoleft).column

--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"Paul Ilacqua" wrote in message
...
What is the best way to get worksheet dimension for worksheets with non
contiguous rows and columns. The dimensions vary sheet to sheet.

Thanks
Paul




Paul Ilacqua

Worksheet Dimensions
 
Damon,
That should do it or get me close to my range that I need. Thank You.
Paul

"Damon Longworth" wrote in message
...
What do you mean by "worksheet dimensions"? You want the last used row and
last used column?

You can focus on a row or column that always contains data for each
record. Then you can use something similar to:

range("a65536").end(xlup).row
range("iv1").end(xltoleft).column

--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"Paul Ilacqua" wrote in message
...
What is the best way to get worksheet dimension for worksheets with non
contiguous rows and columns. The dimensions vary sheet to sheet.

Thanks
Paul







All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com