#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default SumProduct?

The following formula will sum two columns if th criteria is met in
the first column, but it won't sum three coumns. Any suggestions?

=SUMPRODUCT((F20:F2000=6.5)*(P20:P2000+Q20:Q2000))

=SUMPRODUCT((F20:F2000=6.5)*(P20:P2000+Q20:Q2000+r 20:r2000))

  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SumProduct?

Provided there are no error values within the ranges concerned
you could try it as:
=SUMPRODUCT((F20:F2000=6.5)*(P20:R2000))

Alternatively, if seemingly incorrect results are being returned
due to col F containing calculated values,
then perhaps you could use round:
=SUMPRODUCT((ROUND(F20:F2000,1)=6.5)*(P20:R2000))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"JP" wrote in message
...
The following formula will sum two columns if th criteria is met in
the first column, but it won't sum three coumns. Any suggestions?

=SUMPRODUCT((F20:F2000=6.5)*(P20:P2000+Q20:Q2000))

=SUMPRODUCT((F20:F2000=6.5)*(P20:P2000+Q20:Q2000+r 20:r2000))



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 287
Default SumProduct?

What result do you get with the second formula? If there's any text in
R20:R2000 (that can't be co-erced to a number) then your formula will give a
#VALUE! error.

This formula will ignore any text

=SUM(IF(F20:F2000=6.5,P20:R2000))

It's an "array formula" which must be confirmed with CTRL+SHIFT+ENTER so
that curly braces like { and } appear around the formula in the formula bar



"Max" wrote:

Provided there are no error values within the ranges concerned
you could try it as:
=SUMPRODUCT((F20:F2000=6.5)*(P20:R2000))

Alternatively, if seemingly incorrect results are being returned
due to col F containing calculated values,
then perhaps you could use round:
=SUMPRODUCT((ROUND(F20:F2000,1)=6.5)*(P20:R2000))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"JP" wrote in message
...
The following formula will sum two columns if th criteria is met in
the first column, but it won't sum three coumns. Any suggestions?

=SUMPRODUCT((F20:F2000=6.5)*(P20:P2000+Q20:Q2000))

=SUMPRODUCT((F20:F2000=6.5)*(P20:P2000+Q20:Q2000+r 20:r2000))




  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SumProduct?

What result do you get with the second formula?

The 2nd formula was just meant to highlight the possibility
of seemingly incorrect returns due to col F having calculated values.
An inference, given that OP didn't state this.

For values which look like "6.5" in col F due to formatting,
but which are really underlying eg: 6.49, 6.51
then OP may consider using the 2nd formula.

In my response, I didn't cover possibility of text in the ranges
(it was implicitly assumed)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default SumProduct?

Thanks to all. I used =sum(if(f20:f2000=6.5,P20:r2000)) It did the
job.

I have one question. How do you know when something is to be an array
formula. Does that occur when you are querying a range?

Thank you.

On Fri, 4 Jan 2008 17:48:06 -0800, daddylonglegs
wrote:

What result do you get with the second formula? If there's any text in
R20:R2000 (that can't be co-erced to a number) then your formula will give a
#VALUE! error.

This formula will ignore any text

=SUM(IF(F20:F2000=6.5,P20:R2000))

It's an "array formula" which must be confirmed with CTRL+SHIFT+ENTER so
that curly braces like { and } appear around the formula in the formula bar



"Max" wrote:

Provided there are no error values within the ranges concerned
you could try it as:
=SUMPRODUCT((F20:F2000=6.5)*(P20:R2000))

Alternatively, if seemingly incorrect results are being returned
due to col F containing calculated values,
then perhaps you could use round:
=SUMPRODUCT((ROUND(F20:F2000,1)=6.5)*(P20:R2000))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"JP" wrote in message
...
The following formula will sum two columns if th criteria is met in
the first column, but it won't sum three coumns. Any suggestions?

=SUMPRODUCT((F20:F2000=6.5)*(P20:P2000+Q20:Q2000))

=SUMPRODUCT((F20:F2000=6.5)*(P20:P2000+Q20:Q2000+r 20:r2000))







  #6   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SumProduct?

I used =sum(if(f20:f2000=6.5,P20:r2000)) It did the job.

but how about the earlier:
=SUMPRODUCT((F20:F2000=6.5)*(P20:R2000))


Didn't it work for you, too?
and without you having to worry about array-entering, to boot

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default SumProduct?

Actually, no. That returned a value error.

On Sat, 5 Jan 2008 20:36:15 +0800, "Max" wrote:

I used =sum(if(f20:f2000=6.5,P20:r2000)) It did the job.


but how about the earlier:
=SUMPRODUCT((F20:F2000=6.5)*(P20:R2000))


Didn't it work for you, too?
and without you having to worry about array-entering, to boot


  #8   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SumProduct?

Actually, no. That returned a value error.

You've got text or formula returned errors then in the range,
which you didn't exactly reveal in your orig. posting

It would have worked otherwise.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default SumProduct?

If that's the case, which I don't believe it is, then why did the
other formula work?

On Sat, 5 Jan 2008 22:46:36 +0800, "Max" wrote:

Actually, no. That returned a value error.


You've got text or formula returned errors then in the range,
which you didn't exactly reveal in your orig. posting

It would have worked otherwise.


  #10   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SumProduct?

If that's the case, which I don't believe it is,

You've got text or formula returned errors then in the range,
which you didn't exactly reveal in your orig. posting
It would have worked otherwise.


Does this convince you that it works? :
http://www.freefilehosting.net/download/3a3j8

.. why did the other formula work?

why doesn't daddy respond to you?

note that I never said daddy's formula didn't work

my question to you is:
why were you using a *sumproduct* formula originally?





  #11   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default SumProduct?

Does this convince you that it works? :
http://www.freefilehosting.net/download/3a3j8


well? doesn't the sumproduct work, John?
do we still have a discussion here?



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
sumproduct? sumif(sumproduct)? David Excel Worksheet Functions 3 July 13th 07 07:06 PM
SUMPRODUCT I Think!! DP7 Excel Worksheet Functions 1 March 30th 07 09:53 PM
Sumproduct (I think?) Sandy Excel Worksheet Functions 5 March 30th 07 05:01 PM
sumproduct help JR Excel Worksheet Functions 0 February 27th 06 02:57 PM
Sumproduct..help please Terry Excel Worksheet Functions 6 September 30th 05 08:53 AM


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