On a large scale, what is the most efficient way to multiply 2 columns together given a criteria (A1)
?Please Login or Register to view this content.
?Please Login or Register to view this content.
Other?
On a large scale, what is the most efficient way to multiply 2 columns together given a criteria (A1)
?Please Login or Register to view this content.
?Please Login or Register to view this content.
Other?
TechRetard.ToString();
There are always multiple ways to do something, when it doubt, drink a beer.
I do not care if you rep or not but please mark post as Solved if there is resolution so I stop going back and checking if anything else is needed.
I would guess the first, but most efficient would be to add a column that multiplies B2:B10 by C2:C10, then use SUMIF
e.g =SUMIF(A2:A10,A1,D2:D10)
where D2:D10 contains the =B2*C2 formula copied down
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
=SUMPRODUCT(--(A2:A10=A1), B2:B10,C2:C10)
or
=SUMPRODUCT((A2:A10=A1)*(B2:B10)*(C2:C10))
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
If you're interested there is calculation timer code at this link. Then you can run some tests and see for yourself which version is more efficient.
http://msdn2.microsoft.com/en-us/library/aa730921.aspx
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks