Hello all,

how would one iterate over m rows (with n columns, but n = m) in a spreadsheet and select several entries, call them cell(m, n) with fixed m for each step, such that they can multiply cell(m, arg1) * . . . * cell(m, argN) with given parameters arg1, . .
., argN that were passed to this defined function. How would I do this in VBA?

For example,

double wholeLife(a, b, c){

double benefit = 0;

for(m = 1; m <=dim(matrix(m, n)); m++){

benefit = benefit + cell(m, a) * cell(m, b) * cell(m, c);

}

return benefit;

}//How would I do this in VBA?