M
MLT
I'm trying to get started with User-Defined Functions. For the sake
of learning, I want to create a UDF that acts same as the built-in
SumProduct function. So, the two arguments would be two ranges,
range1 and range2. The first cell.value in range1 would be multiplied
with the first cell.value in range2 and so on - and then all added
together at the end. I thought I'd start by using a for loop to go
through each cell in range1 but now I'm not sure what is the best/most
efficient method to pair the values in range1 with their corresponding
values in range2. How should this be done?
of learning, I want to create a UDF that acts same as the built-in
SumProduct function. So, the two arguments would be two ranges,
range1 and range2. The first cell.value in range1 would be multiplied
with the first cell.value in range2 and so on - and then all added
together at the end. I thought I'd start by using a for loop to go
through each cell in range1 but now I'm not sure what is the best/most
efficient method to pair the values in range1 with their corresponding
values in range2. How should this be done?