View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default My sumif formulas containin links to other workbooks do not ca

Hi

The double unary minus -- is used to coerce the values of True to 1 and
False to 0 so that they can be used in the calculation within
Sumproduct.

For an excellent treatise on this and the Sumproduct function in
general, take a look at Bob Phillip's site
http://xldynamic.com/source/xld.SUMPRODUCT.html

--
Regards

Roger Govier


sgm_wfa wrote
Dave,
Thank you for your answer. The formula works perfectly now. I
looked at the description of sumproduct in excel help and it
doesn't describe it as working like a sumif formula. I see that
you added the "--" at the beginning and used =A3 instead of ,A3.
Can you tell me how this works? (If this is a stupid question,
please feel free to not reply to it but I am just curious to know
how the formula works) Thanks again.
"Dave Peterson" wrote:
typo alert...
=SUMproduct(--('C:\yourfolder\[Test.xls]Sheet1'!$A1:$A99,A3),
('C:\yourfolder\[Test.xls]Sheet1'!$B1:$B99))
Should have been:
=SUMproduct(--('C:\yourfolder\[Test.xls]Sheet1'!$A1:$A99=A3),
('C:\yourfolder\[Test.xls]Sheet1'!$B1:$B99))
(The comma before A3 should have been an equal sign.)