LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Reading a VBA Array - Thanks

Dough and RBS,

Many thanks for the effort you put into your solutions.

Both work admirably.

I have experimented with them both and whilst I now understand How they work
I need to explore more into Why they work.

Once again many thanks
You have enabled solve a long standing work problem

Regards

John



"SMS - John Howard" wrote in message
...
The worksheet formula:
=Frequency(A2:A10,B2:B5) applied to the below sample worksheet works fine
and produces the correct array 1, 2, 4, 2

A B
1 Scores Bins
2 79 70
3 85 79
4 78 89
5 85
6 50
7 81
8 95
9 88
10 97

Yet this VBA Macro;

Dim Frq() As Variant
Sub Freq()

Frq = Evaluate("=Frequency(A2:A10,B2:B5)")
x = UBound(Frq)
ReDim Frq(x)
For c = LBound(Frq) To UBound(Frq)
Debug.Print Frq(c)
Next c

End Sub

produces a null for each element of the For Next Loop.

Can anyone tell me why?

TIA
John Howard




 
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
Reading .csv file into array mousetrap Excel Programming 1 November 26th 03 07:47 AM
[excel 97 vba ] Reading ranges into an array steve Excel Programming 1 October 30th 03 02:10 PM
reading an arbitrary selection into a 1D array Jamie Martin[_2_] Excel Programming 5 September 30th 03 05:25 PM
Reading formatted cell values into an array Tom Ogilvy Excel Programming 0 September 19th 03 06:32 PM
Reading a cell into an array Tick-Tock Excel Programming 2 September 11th 03 07:33 PM


All times are GMT +1. The time now is 11:59 PM.

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

About Us

"It's about Microsoft Excel"