Thread: UDF
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default UDF

Arne,

A simple UDF that takes 3 values and multiples them together:-

Public Function mulitplythem(v1, v2, v3) As Double
mulitplythem = v1 * v2 * v3
End Function

called from a cell with

=mulitplythem(A1,A2,A3)

Would take the 3 values from the cells A1,A2 & A3 and multiply them together.

Mike


"Arne Hegefors" wrote:

Hi! I am trying to write a simple udf that takes three parameters as
argument. never mind what the udf is supposed to do, i just cant get it to
work for more than one argument. pls help me!

Function duration(n, t)
duration = n + t
End Function

This works for one argument (i then skip the t in the duartion line). pls
help!