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: 6
Default frequency in VBA

Dear all

at the end of this subroutine I am using the frequency function but I
need the {} around it in order to be calculated correctly. How can I do
this?

Sub histo()
Dim rg, rn As Range
Dim i, no As Integer
Dim rep1, rep2 As String
Dim max, min As Double

rep1 = InputBox("define the range of the variable")
Set rg = Range(rep1)

no = InputBox("insert the number of bins, otherwise leave empty")
'If no = Nothing Then no = rg.Rows.Count / 10

rep2 = InputBox("where should i put the bins")
Set rn = Range(rep2)

max = WorksheetFunction.max(rg)
min = WorksheetFunction.min(rg)
For i = 1 To no
rn.Cells(i, 1) = min + i * (max - min) / no
Next i
For i = 1 To no
rn.Cells(i, 2) = WorksheetFunction.Frequency(rg, rn.Cells(i, 1))
Next i

End Sub

 
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 08:53 AM.

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"