ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dynamic Range (https://www.excelbanter.com/excel-programming/413070-dynamic-range.html)

Arnie

Dynamic Range
 
Guys i have a dynamic range that to find the last Cell with data in i use


Range("A3").End(xlDown).Offset(-1, 0).Select

i now need to select across to column L and up to Row 3 i have used

ActiveCell.Resize(1, 12).Select to select to column L but how do i
select up to row 3

Thanks in advance

Arnie


Aviashn

Dynamic Range
 
If I understand you correctly this should work.

Range(ActiveCell,Cells(3,12)).Select

Jim Thomlinson

Dynamic Range
 
Range takes 1 or 2 arguments. If you supply 2 arguments you get the
rectangular range bounded by the 2 ranges... So in your case (note it is
usually safer to come up from the bottom)...

range(range("L3"), cells(rows.count, "A").end(xlup)).select

--
HTH...

Jim Thomlinson


"Arnie" wrote:

Guys i have a dynamic range that to find the last Cell with data in i use


Range("A3").End(xlDown).Offset(-1, 0).Select

i now need to select across to column L and up to Row 3 i have used

ActiveCell.Resize(1, 12).Select to select to column L but how do i
select up to row 3

Thanks in advance

Arnie



All times are GMT +1. The time now is 12:32 PM.

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