ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UDF (https://www.excelbanter.com/excel-programming/392172-re-udf.html)

Gary''s Student

UDF
 
Perhaps its how you are calling it in the worksheet:

=duration(1,2)
=duration(A1,B1)

both work

In VBA:

Sub routine()
MsgBox (duration(1, 2))
End Sub

also works
--
Gary''s Student - gsnu200733


"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!



All times are GMT +1. The time now is 10:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com