Excel expression "sumproduct" in Access (1 Viewer)

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
 

Jon K

Registered User.
Local time
Today, 22:55
Joined
May 22, 2002
Messages
2,209
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)
.
 

KenHigg

Registered User
Local time
Today, 18:55
Joined
Jun 9, 2004
Messages
13,327
I'll....be...darn...cool - Thanks for the tip!
 
F

fatfish

Guest
Thanks Jon!

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

Users who are viewing this thread

Top Bottom