Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Can somebody please explain what the puprose is of the -- in the following
formula? =SUMPRODUCT(--(ISNUMBER(C5:C61)),--(MONTH(C5:C61)=2)) Thank you. Mark |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Basically, the easy answer is that -- is the same as multiplying the result
by -1 twice. So why do this? ISNUMBER(C5) returns either TRUE or FALSE. Neither of which are usable by SUMPRODUCT. SUMPRODUCT needs numbers. Excel does equate FALSE to 0 and TRUE to 1. So, by multiplying TRUE or FALSE by -1 twice you get: 0 x -1 x -1 = 0 1 x -1 x -1 = 1 You now have either a 0 or a 1 that SUMPRODUCT can work with. HTH Elkar "NWO" wrote: Can somebody please explain what the puprose is of the -- in the following formula? =SUMPRODUCT(--(ISNUMBER(C5:C61)),--(MONTH(C5:C61)=2)) Thank you. Mark |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
http://www.mcgimpsey.com/excel/formulae/doubleneg.html
http://www.xldynamic.com/source/xld.SUMPRODUCT.html -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "NWO" wrote in message ... Can somebody please explain what the puprose is of the -- in the following formula? =SUMPRODUCT(--(ISNUMBER(C5:C61)),--(MONTH(C5:C61)=2)) Thank you. Mark |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you very much for the explanation.
Mark :) "Elkar" wrote: Basically, the easy answer is that -- is the same as multiplying the result by -1 twice. So why do this? ISNUMBER(C5) returns either TRUE or FALSE. Neither of which are usable by SUMPRODUCT. SUMPRODUCT needs numbers. Excel does equate FALSE to 0 and TRUE to 1. So, by multiplying TRUE or FALSE by -1 twice you get: 0 x -1 x -1 = 0 1 x -1 x -1 = 1 You now have either a 0 or a 1 that SUMPRODUCT can work with. HTH Elkar "NWO" wrote: Can somebody please explain what the puprose is of the -- in the following formula? =SUMPRODUCT(--(ISNUMBER(C5:C61)),--(MONTH(C5:C61)=2)) Thank you. Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula Question | Excel Discussion (Misc queries) | |||
formula question | Excel Discussion (Misc queries) | |||
Formula Question | Excel Worksheet Functions | |||
MID formula question | Excel Worksheet Functions | |||
Newbie Question - Subtraction Formula Question | Excel Discussion (Misc queries) |