Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamic Array

I try to declare a dynamic array but don't know how. This is what I wan
to do in plain english. I use columns A1:AP1 to let the user key i
each individual number. From the range that have numbers, I use th
counter as array size.

e.g

Sub Lwheel()

Dim wheel()
Q1. Redim Wheel(0 to ?(how to get this value equal to the range A1:AP
that been used?))

Example the user key in A1=1,A2=2,A3=3,A4=11,A5=21,A6=32,A7=38

So that the array becomes as below;
Wheel(0)=A1 # 1
Wheel(1)=A2 # 2
Wheel(2)=A3 # 3
Wheel(3)=A4 # 11
Wheel(4)=A5 # 21
Wheel(5)=A6 # 32
Wheel(6)=A7 # 38

Some codes

End Sub

Regards
Michae

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Dynamic Array

Try the worksheet COUNTA fun ction

worksheetfunction.counta(Range("A1:AP1"))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Michael168 " wrote in message
...
I try to declare a dynamic array but don't know how. This is what I want
to do in plain english. I use columns A1:AP1 to let the user key in
each individual number. From the range that have numbers, I use the
counter as array size.

e.g

Sub Lwheel()

Dim wheel()
Q1. Redim Wheel(0 to ?(how to get this value equal to the range A1:AP1
that been used?))

Example the user key in A1=1,A2=2,A3=3,A4=11,A5=21,A6=32,A7=38

So that the array becomes as below;
Wheel(0)=A1 # 1
Wheel(1)=A2 # 2
Wheel(2)=A3 # 3
Wheel(3)=A4 # 11
Wheel(4)=A5 # 21
Wheel(5)=A6 # 32
Wheel(6)=A7 # 38

Some codes

End Sub

Regards
Michael


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to declare a dynamic array Peter Rooney Excel Discussion (Misc queries) 4 April 13th 05 01:25 PM
Dynamic 2D Array ExcelMonkey[_52_] Excel Programming 4 January 31st 04 09:32 PM
Dynamic Array dan Excel Programming 4 January 27th 04 04:16 PM
see if dynamic array used RobcPettit Excel Programming 2 January 17th 04 12:44 AM
Q: Declaring a dynamic array Srdjan Kovacevic[_4_] Excel Programming 1 January 16th 04 07:24 PM


All times are GMT +1. The time now is 12:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"