LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Another SumProduct Question

Here's a simple example of something I'm trying to figure out.
A B
1 5
1 7
2 4
2 9

Can I calculate (5*4)+(7*9)=83 using a sumproduct?

I tried this but it doesn work for what I think is an obvious reason.
SumProduct(((B1:B4)*(A1:A4=1)),((B1:B4)*(A1:A4=2)) ). I believe this isn't
working because there is never a case where A1:A4=1 AND A1:A4=2. Therefore I
get the answer = 0.

I'm also having a hard time trying to figure out how I would do this in a
loop of some kind as an alternative. Can I define B1:B2 as a range and B3:B4
as a range and pass them to a function that computes B1*B3 + B2*B4? How do I
define those ranges in code?

Thanks for your help.




 
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
sumproduct question please Lise Excel Discussion (Misc queries) 4 March 17th 10 10:37 PM
Sumproduct question ace Excel Discussion (Misc queries) 2 April 6th 09 09:43 PM
SumProduct Question Gina[_2_] Excel Discussion (Misc queries) 4 August 25th 08 09:42 PM
SUMPRODUCT question Jock Excel Worksheet Functions 3 July 8th 08 01:24 PM
Sumproduct question Barb Reinhardt Excel Worksheet Functions 3 November 17th 06 06:53 PM


All times are GMT +1. The time now is 04:18 AM.

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"