Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thank you
its working in this form I was actualy tring to see whether the range was in rows or colums and then performing the loop to get the frequency. Function freq(lb As Variant, ub As Variant, datarange As range) Count = 0 If datarange.Columns.Count = 1 Then For c = 1 To datarange.Rows.Count d = datarange.Cells(c, 0).Value d = y.Value If d <= ub And d lb Then Count = Count + 1 Next Else If datarange.Rows.Count = 1 Then For c = 1 To datarange.Columns.Count d = datarange.Cells(0, c).Value If (d <= ub & d ib) Then Count = Count + 1 Next End If End If freq = Count End Function this was not working. i was basicalu tring to find the freq. in a range. and if i wish to write countif( ) function my self how can i take the operators, i.e "<", "" etc in my function. Regards Sourav Ken Johnson wrote: Hi Sourav, It worked for me. However, why aren't you just using Excel's COUNTIF worksheet function? The only difference is the arguments are in reverse order, Range of data first, then value being counted. Ken Johnson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why input range contains non-numeric data? | Excel Discussion (Misc queries) | |||
Define variable range input for SUM() function | Excel Worksheet Functions | |||
Why does a simple frequency distribution count out of range data? | Excel Worksheet Functions | |||
How can I run a spreasheet over range of input data ? | Excel Discussion (Misc queries) | |||
How can I set a input range for entrying data. | Excel Worksheet Functions |