LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default sumproduct range question

Before you decide on which function to use, you need to determine what it
is that you want to do.

For instance, if you just wish to sum values based upon one single, simple
condition, then use SUMIF. If there are multiple conditions, or the
condition is too complex for SUMIF, then look at SUMPRODUCT, or
array-entered SUM(IF(...

The thing about all such functions is that they basically work on ranges or
arrays. If the range is independent that suggests it is being evaluated for
the values in the range. If the range is tested against another value, that
is to determine whether the condition is met or not. Unfortunately, a met
condition returns TRUE, an unmet condition returns FALSE, which is not of
much value in doing math, so it is necessary to coerce these values. That is
where the * operator comes into play, or the double unary --.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Edward" wrote in message
ps.com...
I am using SUMPRODUCT to do a table lookup/sum for me. For example I
have data below:

1 2
A color price
B red 500
C red 1000
D blue 750

If a use SUMPRODUCT((A2:A4=A2)*(B2:B4)) I get 1500 or
SUMPRODUCT((A2:A4=A4)*(B2:B4)) and I get 750 and I can use this but I
am having trouble understanding what the range argument represents. I
have tried just putting it in a cell (eg. =((A2:A4=A2)*(B2:B4)) ) but I
just get #VALUE! and if I put in just SUMPRODUCT((A2:A4=A4)) I get 0
while I would expect to get 1 or TRUE or perhaps the row number.

This seems like a powerful technique to use that I imagine has other
applications but I really do not understand the syntax.

What is going on here?

Thanks.

Edward



 
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
URGENT: Please Advise. SumProduct and Operand Question Brent E Excel Discussion (Misc queries) 8 May 24th 06 07:48 PM
sumproduct question - kind of... Poody Excel Worksheet Functions 3 April 14th 06 08:48 PM
Dynamic range names, multiple criteria, sumproduct [email protected] Excel Discussion (Misc queries) 1 September 20th 05 02:58 AM
sumproduct w/horizontal range not working dcd123 Excel Worksheet Functions 6 August 22nd 05 11:48 PM
SUMPRODUCT with date range question Rob V Excel Discussion (Misc queries) 1 January 31st 05 03:55 PM


All times are GMT +1. The time now is 02:18 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"