View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
SantaClaus SantaClaus is offline
external usenet poster
 
Posts: 6
Default Can I use a UDF in an array formula?

Hi all,

I wrote a small UDF which returns 0 or 1 depending on whether the
input cell meets certain criteria. It's something like

MyFunction(InputCell as double, Criteria1, Criteria2) as Integer

where the inputs and the outputs are single values, not arrays.

Is there a way to use it in an array formula?

For example, I have a named range called "bal". I tried entering the
array formula

{sum( 1*( MyFunction(bal,Criteria1,Criteria2)) )}

to count how many records meet my criteria, but it didn't work.

Any suggestion would be more than welcome!

Thanks a lot!