Excel expression "sumproduct" in Access

  • Thread starter Thread starter fatfish
  • Start date Start date
F

fatfish

Guest
Hi all,

I'm now building an Access databse and analysis market report.
Does anyone know that how to realize the Excel expression "sumproduct"
in Access?

Sumproduct: Multiplies corresponding components in the given arrays, and returns the sum of those products.
SUMPRODUCT(array1,array2,array3, ...)

It returns similiar result as the formula SUM(A2:B4*C2:D4) entered as an array.

Thanks in advance!! :)

Best Regards,
FF
 
fatfish said:
Does anyone know that how to realize the Excel expression "sumproduct"
in Access?
If you make a reference to the Microsoft Excel x.x Object Library (when the Access code window is open, choose menu Tools, References... and select the library) you can then use the SumProduct() function in VBA by passing arrays to it, e.g.

MsgBox WorksheetFunction.SumProduct(array1, array2, etc)
.
 
I'll....be...darn...cool - Thanks for the tip!
 
Thanks Jon!

You provide a super solution for Excel expression to Access!
Thanks!
 

Users who are viewing this thread

Back
Top Bottom