ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Dynamic Range (https://www.excelbanter.com/new-users-excel/192528-dynamic-range.html)

Arnie

Dynamic Range
 
I have a dynamic range which i use

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

to find the last cell with data in.

Then i use ActiveCell.Resize(1, 12).Select to select across to column L

What i can't seem to do is select up from ActiveCell in this case A363 (this
is dynamic) to L363 to A3:L3 (this range is then required to be copied)

Any help would be appreciated

Thanks in advance

Arnie


Bob Phillips[_3_]

Dynamic Range
 
How about

Range(ActiveCell, ActiveCell.End(xlUp)).Resize(,12)

--
__________________________________
HTH

Bob

"Arnie" wrote in message
...
I have a dynamic range which i use

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

to find the last cell with data in.

Then i use ActiveCell.Resize(1, 12).Select to select across to column L

What i can't seem to do is select up from ActiveCell in this case A363
(this
is dynamic) to L363 to A3:L3 (this range is then required to be copied)

Any help would be appreciated

Thanks in advance

Arnie




Per Jessen

Dynamic Range
 
Hi Arnie

Try this:

FirstCell = "L3"
LastCell = Range("A3").End(xlDown).Offset(-1, 0).Address
Range(FirstCell, LastCell).Copy

Regards,
Per

"Arnie" skrev i meddelelsen
...
I have a dynamic range which i use

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

to find the last cell with data in.

Then i use ActiveCell.Resize(1, 12).Select to select across to column L

What i can't seem to do is select up from ActiveCell in this case A363
(this
is dynamic) to L363 to A3:L3 (this range is then required to be copied)

Any help would be appreciated

Thanks in advance

Arnie



Arnie

Dynamic Range
 
Thanks for that i am posting a new question if you could help

"Bob Phillips" wrote:

How about

Range(ActiveCell, ActiveCell.End(xlUp)).Resize(,12)

--
__________________________________
HTH

Bob

"Arnie" wrote in message
...
I have a dynamic range which i use

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

to find the last cell with data in.

Then i use ActiveCell.Resize(1, 12).Select to select across to column L

What i can't seem to do is select up from ActiveCell in this case A363
(this
is dynamic) to L363 to A3:L3 (this range is then required to be copied)

Any help would be appreciated

Thanks in advance

Arnie






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

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