View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Dan E[_3_] Dan E[_3_] is offline
external usenet poster
 
Posts: 53
Default Array multiplication in VBA

I figured I may have to use a loop, Thanks to everyone for their responses

Dan E

"Dan E" wrote in message ...
I am trying to simulate the behaviour of an array multiplication such as
{=(A1:A10)*(B1:B10)} in VBA. The resulting array should contain:
={A1*B1, A2*B2, . . . , A10*B10}.

I was hoping to avoid writing a loop if it is at all possible?

I don't think there is a worksheetfunction which does this and I was
hoping to avoid the loop:

For i = 0 to Ubound(Temp1)
Temp3(i) = Temp1(i)*Temp2(i)
Next

Is there an easy way to do this?

Dan E