Hi,
Hopefully this is an easy one...
I'm looking to calculate the product of a nymber of consecutive cells in a particular row using VB.
Example.
I have, say, 5 variables listed in row 2 and I wish to find the product of these variables in cells B6 to B10 and produce the answer in cell B11
i.e. cell B11 = B6*B7*B8*B9*B10
In this example this is easy, however the problem is that I don't know how many variables I'll have, I only know the starting cell of the product will be in cell B(number of variables + 1) (e.g. B6 if 5 variables, B4 if 3 variables, etc.) and the answer will always be in cell B(2*number of variables + 1) (e.g. B11 if 5 variables, B7 if 3 variables).
Can this be done with a simple command or will a loop be needed?
Thanks,
Mbrolass.
Bookmarks