ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Use of integer variable for sizing of matrix (https://www.excelbanter.com/excel-programming/273902-use-integer-variable-sizing-matrix.html)

Cor Steeghs

Use of integer variable for sizing of matrix
 
Hello,
I would like VBE to check rowcount in column a,
then make a named range, more like :
n = Worksheets("LOAD_A").Range("a" & Rows.Count).End(xlUp).Row
Worksheets("LOAD_A").[A2:A10].Name = "WGHTLDA"
only, instead of ending the named range at A10, I want it
to end at the n-th row...
Thanks for your attention and/or reply and best regards, Cor Steeghs




Cecilkumara Fernando

Use of integer variable for sizing of matrix
 
Steeghs,
n = Worksheets("LOAD_A").Range("a" & Rows.Count).End(xlUp).Row
Worksheets("LOAD_A").Range("A2:A" & n).Name = "WGHTLDA"
Cecil

"Cor Steeghs" wrote in message
...
Hello,
I would like VBE to check rowcount in column a,
then make a named range, more like :
n = Worksheets("LOAD_A").Range("a" & Rows.Count).End(xlUp).Row
Worksheets("LOAD_A").[A2:A10].Name = "WGHTLDA"
only, instead of ending the named range at A10, I want it
to end at the n-th row...
Thanks for your attention and/or reply and best regards, Cor Steeghs






keepITcool

Use of integer variable for sizing of matrix
 
If you create a NamedRange in LOAD_A


like dnDATA=offset(a1;0;0;counta(a:a);counta(1:1))

then you can just load that instead.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


Cor Steeghs wrote:

Hello,
I would like VBE to check rowcount in column a,
then make a named range, more like :
n = Worksheets("LOAD_A").Range("a" & Rows.Count).End(xlUp).Row
Worksheets("LOAD_A").[A2:A10].Name = "WGHTLDA"
only, instead of ending the named range at A10, I want it
to end at the n-th row...
Thanks for your attention and/or reply and best regards, Cor Steeghs






All times are GMT +1. The time now is 07:28 AM.

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