passing arrays to user defined functions

G

Guest

hope it is easy one
can any one help me in this regard
how to pass arrays to userdefined functions like
sum(A3:A10) --> my_fun(A3:A10) and how to use those values in the function
that i write?

one more thing is

if i have a list of data(numbers) and i have to count the numbers that fall
in a given range like

if i have 70 45 84 96 85 74 12 36 45 i have to count the number is more
than 50 and numbers less than 50.

is there any function for this.
please help me in this regard
 
G

Guest

hi thanks for the help it is working as sum and sum if and my problem is
along with the data range i need to pass a variable also to the function so
that it will check.

like myfun(a1:a30,'>',30) or myfun(a1:a30,'<',30)
this function should give me the result like no of cells that are containg
value less than 30 or greater then 30.

one more problem is why the excel is saying that this file contains
unsecured data macros etc.. how can clear that problem??? or if want to make
all my functions as an excel addin file what i have to do. where i have to
insert the functions i.e. in the work book or inserting a new module?

thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top