422,024 Members | 1,122 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 422,024 IT Pros & Developers. It's quick & easy.

Sum of product vba

P: 14
Can someone give some hints???
Id like to know if someone have a code for visual basic/ excel to calculate the SUM OF the product of a sequence of numbers in VBA, i'm using windowns 7/vista. In other words
I want to calculate the value of


The definition of the product of n numbers is https://es.wikipedia.org/wiki/Productorio
x = 10 -1/n is the number generating function for j from 0 to n
Product function in VBA of all the numbers that are generated from that equation (x = 10 -1/n) is given by:
Function mo(J, n) As Double

Dim i As Integer
Dim x As Double

mo = (x^2)*y
For i = 2 To n
x = 10 - (1 / i)
y= 10 - (1 /( i-1))

mo = mo * (x^2)*y
Next i

mo = mo / ((x^2)*y)

End Function

I want the sum of [product (x^2)*y]*1/100 from i = 2 To n
Can someone tell me please how to calculate the sum above in vba/excel? in other words how do i calculate the sum of the(Function mo (x^2)*y])/100 described above from i = 2 To n ???
many thks in advance
Sep 11 '17 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.