ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range definition (https://www.excelbanter.com/excel-programming/400210-range-definition.html)

thewizz

Range definition
 
I am trying to define a range "Selection.AutoFill
Destination:=Range("M5:T???")" Where T???? changes depending upon how much
data (# of filled Rows) is in column "A". I have used several methods to
determine how much data is in Column "A" but I can not figure out how to put
that number back into the Range statement.

Hope this makes sense!

Thanks for your help!
--
I am not where I intended to go, but I think I am where I am supposed to be!

Jim Thomlinson

Range definition
 
Try something like this...

Destination:=Range("M5:T" & Cells(Rows.Count, "A").End(xlUp).Row)
--
HTH...

Jim Thomlinson


"thewizz" wrote:

I am trying to define a range "Selection.AutoFill
Destination:=Range("M5:T???")" Where T???? changes depending upon how much
data (# of filled Rows) is in column "A". I have used several methods to
determine how much data is in Column "A" but I can not figure out how to put
that number back into the Range statement.

Hope this makes sense!

Thanks for your help!
--
I am not where I intended to go, but I think I am where I am supposed to be!


thewizz

Range definition
 
Jim,

Thank you! I ended up with somthing similar, but since I am using the # of
Rows in several subs I made it a variable.

--
I am not where I intended to go, but I think I am where I am supposed to be!


"Jim Thomlinson" wrote:

Try something like this...

Destination:=Range("M5:T" & Cells(Rows.Count, "A").End(xlUp).Row)
--
HTH...

Jim Thomlinson


"thewizz" wrote:

I am trying to define a range "Selection.AutoFill
Destination:=Range("M5:T???")" Where T???? changes depending upon how much
data (# of filled Rows) is in column "A". I have used several methods to
determine how much data is in Column "A" but I can not figure out how to put
that number back into the Range statement.

Hope this makes sense!

Thanks for your help!
--
I am not where I intended to go, but I think I am where I am supposed to be!



All times are GMT +1. The time now is 04:20 PM.

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