Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yes, that helps. Thanks a lot.
"Ron Coderre" wrote: In this formula: =SUMPRODUCT(--(A1:A10&D1:D10="1A")) this section: (A1:A10&D1:D10="1A") returns a series of boolean (fancy word for: TRUE/FALSE) values ....which are not numeric to Excel. When an arithmetic operator (+,-,*,/) is applied to a boolean value, Excel converts TRUE to 1 and FALSE to 0. The standard convention is to use the Double-Minus (--) to convert the values. It works this way: TRUE=TRUE -TRUE = -1 --TRUE = 1 FALSE = FALSE -FALSE = 0 --FALSE = 0 Now, you could easily use 1*TRUE, but the Dbl-Minus indicates to knowledgable users that you are forcing a conversion and not trying to calculate something. So, In the formula, the TRUE/FALSE values are converted to 1's and 0's by the "--" and the SUMPRODUCT calculates the total. Does that help? -------------------------- Regards, Ron Microsoft MVP (Excel) (XL2003, Win XP) "S Muzumdar" wrote in message ... Works like a charm.... Thanks. Quick question - what does the "--" between two parantheses do ? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count cells with numbers and ignore cells with errors | Excel Discussion (Misc queries) | |||
How do I count cells with text but ignore cells with spaces? | Excel Discussion (Misc queries) | |||
Count Only Empty Cells AFTER Cells with Data | Excel Worksheet Functions | |||
Count cells with specific values in the cells next to them? | Excel Worksheet Functions | |||
HOW TO FORMATE CELLS TO COUNT CELLS WITH A FILL COLOR? | New Users to Excel |