Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
RL RL is offline
external usenet poster
 
Posts: 22
Default need help summing product of two arrays

Can anyone show me a formula to sum a product of two arrays only when there
is a match. Suppose I want to add up the product of A and C for Apple
(answer 3%) and Orange (answer 3.5%)

eg.
A B C
1% Apple 100%
2% Orange 50%
3% Pear 25%
4% Apple 50%
5% Orange 50%


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default need help summing product of two arrays

=SUMPRODUCT(--($B$1:$B$5="Apple"),$A$1:$A$5,$C$1:$C$5)

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"rl" wrote in message
...
Can anyone show me a formula to sum a product of two arrays only when
there
is a match. Suppose I want to add up the product of A and C for Apple
(answer 3%) and Orange (answer 3.5%)

eg.
A B C
1% Apple 100%
2% Orange 50%
3% Pear 25%
4% Apple 50%
5% Orange 50%




  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default need help summing product of two arrays

Assuming your data is in rows 1:5 then
=SUMPRODUCT((B1:B5="apple")*A1:A5*C1:C5) produces 3% and
=SUMPRODUCT((B1:B5="orange")*A1:A5*C1:C5) produces 3.5% in cells formatted
as percents with 1 place of decimal. Also
=SUMPRODUCT((B1:B5={"apple","orange"})*A1:A5*C1:C5 ) produces 6.5% in a cell
formatted as percent with 1 place of decimal. You might want to increase the
decimal places to 2.

Tyro

"rl" wrote in message
...
Can anyone show me a formula to sum a product of two arrays only when
there
is a match. Suppose I want to add up the product of A and C for Apple
(answer 3%) and Orange (answer 3.5%)

eg.
A B C
1% Apple 100%
2% Orange 50%
3% Pear 25%
4% Apple 50%
5% Orange 50%




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
summed product of multiple arrays koneil Excel Worksheet Functions 3 April 9th 07 12:50 PM
Summing inventory by quarter and product# patrick Excel Worksheet Functions 1 May 9th 06 08:57 PM
Product of 2 arrays based on criteria Ben010 Excel Discussion (Misc queries) 4 March 20th 06 07:50 PM
Summing Arrays Sloth Excel Worksheet Functions 1 November 18th 05 11:22 PM
summing an array by product category BLW Excel Worksheet Functions 4 May 18th 05 11:13 PM


All times are GMT +1. The time now is 04:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"