Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 204
Default SUMPRODUCT and "--"

I don't understand why sometimes I have to use "--" before an argument in
the SUMPRODUCT fuction, and sometimes a "*".

Can anyone point me to a resource that will explain why and when I have to
use these instead of just commas, so that I don't have to post any more
questions about it!

Thanks

M

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 527
Default SUMPRODUCT and "--"

Bob Philips has a great page on SUMPRODUCT and double unaries '--'

http://www.xldynamic.com/source/xld.SUMPRODUCT.html

HTH
Peter A

"Michelle" wrote:

I don't understand why sometimes I have to use "--" before an argument in
the SUMPRODUCT fuction, and sometimes a "*".

Can anyone point me to a resource that will explain why and when I have to
use these instead of just commas, so that I don't have to post any more
questions about it!

Thanks

M


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default SUMPRODUCT and "--"



"Billy Liddel" wrote in message
...
Bob Philips has a great page on SUMPRODUCT and double unaries '--'


He also has 2 ls in his surname, Welsh origins not Dutch <bg


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default SUMPRODUCT and "--"

Bob Philips has a great page on SUMPRODUCT and double unaries '--'

He also has 2 ls in his surname, Welsh origins not Dutch <bg

Hello,

But he still does not show a SIGN() function around his example with
two OR criteria on that page <vbg

Compare
http://xldynamic.com/source/xld.SUMPRODUCT.html
[look for "=SUMPRODUCT((A1:A10="Ford")+(A1:A10="Renault" ))"]
to
http://sulprobil.com/html/sumproduct.html
[look for "OR Condition"]
and judge yourself.

Regards,
Bernd
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default SUMPRODUCT and "--"

Bernd P wrote:
Bob Philips has a great page on SUMPRODUCT and double unaries '--'

He also has 2 ls in his surname, Welsh origins not Dutch <bg

Hello,

But he still does not show a SIGN() function around his example with
two OR criteria on that page <vbg

Compare
http://xldynamic.com/source/xld.SUMPRODUCT.html
[look for "=SUMPRODUCT((A1:A10="Ford")+(A1:A10="Renault" ))"]



Both ranges are the same and since the same cell can't equal both "Ford" and
"Renault", this will produce the expected result.


to
http://sulprobil.com/html/sumproduct.html
[look for "OR Condition"]



=SUMPRODUCT(SIGN(--(A1:A100<0)+(B1:B100=”YES”)),C1:C100)

Two distinct ranges. Since A1=-3 and B1="Yes" is possible, it is a different
problem requiring a more complex solution.


and judge yourself.



Both solutions appear to be valid, but one is more robust.


Regards,
Bernd



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMPRODUCT and "--"

=SUMPRODUCT(SIGN(--(A1:A100<0)+(B1:B100=”YES”)),C1:C100)

Also, in this application the double unary is redundant. Adding the 2 arrays
will coerce the Boolean to numeric:

=SUMPRODUCT(SIGN((A1:A100<0)+(B1:B100=”YES”)),C1:C 100)

--
Biff
Microsoft Excel MVP


"Glenn" wrote in message
...
Bernd P wrote:
Bob Philips has a great page on SUMPRODUCT and double unaries '--'
He also has 2 ls in his surname, Welsh origins not Dutch <bg

Hello,

But he still does not show a SIGN() function around his example with
two OR criteria on that page <vbg

Compare
http://xldynamic.com/source/xld.SUMPRODUCT.html
[look for "=SUMPRODUCT((A1:A10="Ford")+(A1:A10="Renault" ))"]



Both ranges are the same and since the same cell can't equal both "Ford"
and "Renault", this will produce the expected result.


to
http://sulprobil.com/html/sumproduct.html
[look for "OR Condition"]



=SUMPRODUCT(SIGN(--(A1:A100<0)+(B1:B100=”YES”)),C1:C100)

Two distinct ranges. Since A1=-3 and B1="Yes" is possible, it is a
different problem requiring a more complex solution.


and judge yourself.



Both solutions appear to be valid, but one is more robust.


Regards,
Bernd



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default SUMPRODUCT and "--"



--
__________________________________
HTH

Bob

"Glenn" wrote in message
...
Bernd P wrote:
Bob Philips has a great page on SUMPRODUCT and double unaries '--'
He also has 2 ls in his surname, Welsh origins not Dutch <bg

Hello,

But he still does not show a SIGN() function around his example with
two OR criteria on that page <vbg

Compare
http://xldynamic.com/source/xld.SUMPRODUCT.html
[look for "=SUMPRODUCT((A1:A10="Ford")+(A1:A10="Renault" ))"]



Both ranges are the same and since the same cell can't equal both "Ford"
and "Renault", this will produce the expected result.



Exactly!


to
http://sulprobil.com/html/sumproduct.html
[look for "OR Condition"]



=SUMPRODUCT(SIGN(--(A1:A100<0)+(B1:B100=”YES”)),C1:C100)

Two distinct ranges. Since A1=-3 and B1="Yes" is possible, it is a
different problem requiring a more complex solution.


and judge yourself.



Both solutions appear to be valid, but one is more robust.



No more robust, my example is specifically showing an OR on the same range,
in such circumstances it will not fail so it is robust. You have to look at
it in the context of how/where it is presented.


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 204
Default SUMPRODUCT and "--"

Thanks Guys, it genuinely is all clear now.

Brilliant

M

"Billy Liddel" wrote in message
...
Bob Philips has a great page on SUMPRODUCT and double unaries '--'

http://www.xldynamic.com/source/xld.SUMPRODUCT.html

HTH
Peter A

"Michelle" wrote:

I don't understand why sometimes I have to use "--" before an argument in
the SUMPRODUCT fuction, and sometimes a "*".

Can anyone point me to a resource that will explain why and when I have
to
use these instead of just commas, so that I don't have to post any more
questions about it!

Thanks

M



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default SUMPRODUCT and "--"

Double unary minus:
a.. http://www.mcgimpsey.com/excel/formulae/doubleneg.html
b.. http://xldynamic.com/source/xld.SUMPRODUCT.html

--
David Biddulph


"Michelle" wrote in message
...
I don't understand why sometimes I have to use "--" before an argument in
the SUMPRODUCT fuction, and sometimes a "*".

Can anyone point me to a resource that will explain why and when I have to
use these instead of just commas, so that I don't have to post any more
questions about it!

Thanks

M



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default SUMPRODUCT and "--"

Here's another explanation, from John McGimpsey's site:

http://www.mcgimpsey.com/excel/formulae/doubleneg.html

Hope this helps.

Pete

On Oct 1, 2:32*pm, "Michelle" wrote:
I don't understand why sometimes I have to use "--" before an argument in
the SUMPRODUCT fuction, and sometimes a "*".

Can anyone point me to a resource that will explain why and when I have to
use these instead of just commas, so that I don't have to post any more
questions about it!

Thanks

M




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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
SUMPRODUCT(--ISNUMBER(FIND("AM",C5:160))*(k5:k160="") redneck joe Excel Discussion (Misc queries) 5 August 18th 06 08:31 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


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