ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   variance array (https://www.excelbanter.com/excel-programming/373618-variance-array.html)

kirke

variance array
 
Hi, I define "Dim dt as variante" and
save "5 by 2 matrix value" for dt.

However, if i assume that we don't know 5, (# of rows)
How can I get that number?

I want to use k=dt.rows.count. but it doesn't work.
Do you know any suggestion to calculate it?
Thx.


kirke

variance array
 
Oh, there's typo.

Dim dt As Variant
======
Sorry!


kirke wrote:
Hi, I define "Dim dt as variante" and
save "5 by 2 matrix value" for dt.

However, if i assume that we don't know 5, (# of rows)
How can I get that number?

I want to use k=dt.rows.count. but it doesn't work.
Do you know any suggestion to calculate it?
Thx.



Bob Phillips

variance array
 
TRy

UBound(dt) - LBound(dt) + 1

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"kirke" wrote in message
oups.com...
Hi, I define "Dim dt as variante" and
save "5 by 2 matrix value" for dt.

However, if i assume that we don't know 5, (# of rows)
How can I get that number?

I want to use k=dt.rows.count. but it doesn't work.
Do you know any suggestion to calculate it?
Thx.




kirke

variance array
 
WOW! IT WORKS! Thx VERY MUCH!!!!!! :)


Bob Phillips wrote:
TRy

UBound(dt) - LBound(dt) + 1

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"kirke" wrote in message
oups.com...
Hi, I define "Dim dt as variante" and
save "5 by 2 matrix value" for dt.

However, if i assume that we don't know 5, (# of rows)
How can I get that number?

I want to use k=dt.rows.count. but it doesn't work.
Do you know any suggestion to calculate it?
Thx.




All times are GMT +1. The time now is 01:31 PM.

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