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

If I can find somthing like the worksheet function frequency in th
object browser I should be abble to use it right.

i use application.worksheetfunction.frequency and vba give me a ru
time error 1004 unable to get frequency property from worksheetfunctio
class.

is this normal or am I doin somethin wrong

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Silly question

Hi
could you post the complete code (or at least the relevant part).

--
Regards
Frank Kabel
Frankfurt, Germany

"ksnapp " schrieb im
Newsbeitrag ...
If I can find somthing like the worksheet function frequency in the
object browser I should be abble to use it right.

i use application.worksheetfunction.frequency and vba give me a run
time error 1004 unable to get frequency property from

worksheetfunction
class.

is this normal or am I doin somethin wrong?


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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Silly question

Sub frequency_helper()

Dim LRindex As Single
Dim ColumnToWork As Single
Dim namerow As Single
Dim interm As Long
Dim Rng1 As Range
Dim LCdata As Single
Dim name As String
Dim DayNumber As Single
Dim col1 As New Collection

DayNumber = 1
ColumnToWork = 2

Worksheets("frequency").Select
With Worksheets("frequency")

name = Cells(2, ColumnToWork).Value

LRindex = Cells(Rows.Count, "A").End(xlUp).Row
End With

Worksheets("zscore").Select
With Worksheets("zscore")
Range("a2:a16").Select
For Each cell In Selection
If cell.Value = name Then
namerow = cell.Row
End If
Next

LCdata = Cells(3, Columns.Count).End(xlToLeft).Columns
Range("a3", Cells(3, LCdata)).Select

For Each cell In Selection
If cell.Value = DayNumber Then
interm = cell.Column
col1.Add (Cells(namerow, interm).Value)
End If
Next

End With

Worksheets("frequency").Select
With Worksheets("frequency")
Set Rng1 = Range(Cells(3, 1), Cells(LRindex, 1))

Range(Cells(3, ColumnToWork), Cells(LRindex, ColumnToWork)).Select

Selection.Value = Application.WorksheetFunction.Frequency(col1, Rng1)

End With



MsgBox (name)
MsgBox (namerow)

End Su

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Silly question

Hi
though not tested I assume that the usage of a collection object for
Frequency is not allowed

--
Regards
Frank Kabel
Frankfurt, Germany

"ksnapp " schrieb im
Newsbeitrag ...
Sub frequency_helper()

Dim LRindex As Single
Dim ColumnToWork As Single
Dim namerow As Single
Dim interm As Long
Dim Rng1 As Range
Dim LCdata As Single
Dim name As String
Dim DayNumber As Single
Dim col1 As New Collection

DayNumber = 1
ColumnToWork = 2

Worksheets("frequency").Select
With Worksheets("frequency")

name = Cells(2, ColumnToWork).Value

LRindex = Cells(Rows.Count, "A").End(xlUp).Row
End With

Worksheets("zscore").Select
With Worksheets("zscore")
Range("a2:a16").Select
For Each cell In Selection
If cell.Value = name Then
namerow = cell.Row
End If
Next

LCdata = Cells(3, Columns.Count).End(xlToLeft).Columns
Range("a3", Cells(3, LCdata)).Select

For Each cell In Selection
If cell.Value = DayNumber Then
interm = cell.Column
col1.Add (Cells(namerow, interm).Value)
End If
Next

End With

Worksheets("frequency").Select
With Worksheets("frequency")
Set Rng1 = Range(Cells(3, 1), Cells(LRindex, 1))

Range(Cells(3, ColumnToWork), Cells(LRindex, ColumnToWork)).Select

Selection.Value = Application.WorksheetFunction.Frequency(col1, Rng1)

End With



MsgBox (name)
MsgBox (namerow)

End Sub


---
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
Percentage - How silly I feel asking this question !!! Mark Allen Excel Discussion (Misc queries) 5 November 11th 08 05:50 PM
Silly question Darrell_Sarrasin via OfficeKB.com Excel Worksheet Functions 6 May 11th 07 01:08 PM
Silly question about using dates Zerosumgame Excel Discussion (Misc queries) 5 April 1st 06 03:37 AM
Silly Question Mick Southam Excel Programming 4 January 6th 04 09:32 PM
Simply silly question paul Excel Programming 7 August 5th 03 11:38 PM


All times are GMT +1. The time now is 10:08 PM.

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"