LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default frequency in VBA

Dirk wrote:
For i = 1 To no
rn.Cells(i, 2) = WorksheetFunction.Frequency(rg, rn.Cells(i, 1))
Next i


frequency returns an array, not a single number. You can't use it that way.

There will be no loop.
I tried to describe range using "i" and "no", but you can simplify it.

i = 1
range (cells(i,2),cells(no,2)).formulaArray =
worksheetfunction.frequency (rg, range(cells(i,1),cells(no,1))

 
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
IQR of a frequency Lonehunter Excel Worksheet Functions 1 February 17th 11 03:52 PM
Frequency rossmolden Excel Worksheet Functions 4 February 7th 09 11:54 PM
Frequency Fred Roven Excel Worksheet Functions 2 May 31st 06 03:06 AM
histograms - frequency and relative frequency? confusedstudent Excel Discussion (Misc queries) 2 February 8th 06 08:20 AM
frequency sara Excel Discussion (Misc queries) 1 April 5th 05 08:15 PM


All times are GMT +1. The time now is 12:04 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"