LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with passing a range into worksheet function in VBA [email protected] Excel Programming 3 January 27th 07 12:45 AM
Passing a range to a function David Bell Excel Programming 4 July 8th 06 08:32 PM
Passing a range to a function Isabelle[_2_] Excel Programming 1 January 23rd 06 10:24 PM
passing a range from another worksheet Mike O Excel Programming 4 July 21st 05 05:09 PM
Passing a range into a VBA function Floyd[_2_] Excel Programming 4 February 10th 05 01:29 AM


All times are GMT +1. The time now is 09:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"