View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
R Beck R Beck is offline
external usenet poster
 
Posts: 1
Default Passing a range from worksheet to VBA function

Hi all -

I have the following function:

Function regression(x, power())
For i = Lbound(power) to Ubound(power)
regression = regression + x^i + power(i)
Next
End Function

and wish to use the following in Excel

=regression(A1, B1:B3)

But I can't seem to get it to work. What am I missing?

Thanks!
Ryan