ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Column and row references of range (https://www.excelbanter.com/excel-programming/303351-column-row-references-range.html)

Alan Beban[_2_]

Column and row references of range
 
Michael Allen wrote:

Is is possible to determine the extent column and row references of a
temporarily selected ranges of cells in code, ie top left and bottom right?
Cells within the range may contain blanks.

Thanks
Mike


Set rng = Range("aaa1")
MsgBox rng(1, 1).Address & ":" & rng(rng.Rows.Count, _
rng.Columns.Count).Address

Alan Beban

Michael Allen

Column and row references of range
 
Is is possible to determine the extent column and row references of a
temporarily selected ranges of cells in code, ie top left and bottom right?
Cells within the range may contain blanks.

Thanks
Mike




All times are GMT +1. The time now is 02:52 PM.

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