Thread: UDF with IRR
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] stephen.h.dow@gmail.com is offline
external usenet poster
 
Posts: 6
Default UDF with IRR

Trying get a simple function to work - want to calculate the IRR of a
data set using VBA and not a formula. Keep getting an error: Here's
what I have:

Data:
-1000
300
300
300
300

Code:
Function testi(ArrayIn As Double)

ReDim ArrayIn(5) As Double

testi = IRR(ArrayIn(), 0.1)

End Function

Any ideas on how I can get this to work would be greatly appreciated.

Thanks.