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: 2
Default How to take a range input in a function and find the frequency of data in it.

Hi,
I am trying to write a function which takes a range and returns the
frequency of a data in it.

the function is :-

function freq ( q as variant , datarange as range)
count = 0
for i = 1 to datarange.rows.count
if datarange.cells(i,1). value = q then count= count+1
next i
freq = count
end function

this is not working, can any one suggest what is the prob. I just
learning VBA for excel .
is there any site where i can find tutorial for these, (I have
experience of C.) and a ebook to learn VBA for excel.

Thanks
Sourav

 
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
Why input range contains non-numeric data? Nickman Excel Discussion (Misc queries) 10 April 3rd 23 06:49 PM
Define variable range input for SUM() function JeffC Excel Worksheet Functions 4 May 16th 09 03:54 AM
Why does a simple frequency distribution count out of range data? [email protected] Excel Worksheet Functions 3 July 19th 06 07:55 AM
How can I run a spreasheet over range of input data ? prego Excel Discussion (Misc queries) 0 January 6th 06 08:09 PM
How can I set a input range for entrying data. Intercorp Excel Worksheet Functions 1 October 6th 05 09:58 PM


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