Hi,
Similar to this thread: http://www.excelforum.com/excel-gene...-in-excel.html
I'm trying to come up with a VBA solution to.... Sigma from j=0 to i of: L((i-j)/i)*b*t. Any help would be appreciated, thanks.
Hi,
Similar to this thread: http://www.excelforum.com/excel-gene...-in-excel.html
I'm trying to come up with a VBA solution to.... Sigma from j=0 to i of: L((i-j)/i)*b*t. Any help would be appreciated, thanks.
In most programming languages, I would use some kind of For...Next loop for this: http://msdn.microsoft.com/en-us/library/5z06z1kb.aspx
![]()
Please Login or Register to view this content.
Originally Posted by shg
I did the following...
Then I went back to the spreadsheet and input =Sigma(C7) and returned with error: "Compile error: Invalid outside procedure"![]()
Please Login or Register to view this content.
So you are trying to create a user-defined function (UDF). Here's a tutorial from MS on creating UDF's http://office.microsoft.com/en-us/ex...001111701.aspx
try this:
Where you use formula as (based on this example):![]()
Please Login or Register to view this content.
Formula:
Please Login or Register to view this content.
Where C6:C9 is range of your variables C6, C8 i C9 (C7 must be empty!!!). Or define them somewhere else.
And A1 is your value of i
Never use Merged Cells in Excel
Ok so here is what I did...
... and then in an Excel cell I had: =Sigma(C7) and I get #VALUE! as the cell value. Cell C7 has the number '4' in it. Cells C6, C8, and C9 are all integers greater than '0'.![]()
Please Login or Register to view this content.
Where did I drop the ball?
It worked. Thanks zbor!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks