I understand -- is a shorthand but what does -- mean in an excel formula?
I understand -- is a shorthand but what does -- mean in an excel formula?
Click on star (*) below if this helps
It coerces TRUE and FALSE to the numbers 1 and 0 respectively. Often used in an array formula, or a formula using a function like SUMPRODUCT which acts on an array, to convert a series of TRUEs and FALSEs to 1s and 0s which can then be added (or multiplied). It's also another way of writing *1 (though it is the same number of characters, so it can't be considered as a shorthand version) to force a text representation of a numeric value (or date) into that numeric value - essentially, multiplying by -1 and then by -1 again.
Do you have a particular formula in mind?
Hope this helps.
Pete
Last edited by Pete_UK; 09-04-2012 at 01:54 PM.
Hi KM,
First hyphen sign converts the TRUEs in the formula to -1 and second hyphen sign coverts them to +1 or (1)... which then can be summed up to produce the result. remember BODMAS rule which we studied in school.. minus multiplied by minus equals to plus (positive)
It would be better if you share the formula where you have noticed this so that I can explain you in that context.. thanks.
Regards,
DILIPandey
<click on below 'star' if this helps>
DILIPandey, Excel rMVP
+919810929744 (India), +971528225509 (Dubai), [email protected]
Here is a good resource worth bookmarking...
http://xldynamic.com/source/xld.SUMPRODUCT.html
HTH
Regards, Jeff
Thank you. I appreciated the explanation. I understand that it converts TRUE and FALSE to zeros and ones and text to numbers. I didn't realize this
Great..!!
Also you can relate that in vlookup either we can write false or true as last part of the syntax.. and some people used to write 0 and 1 instead of False and True respectively.. this suggests that excel treats False = 0 and True =1 (or any value greater than zero )
So basis this, TRUEs are 1 and FALSEs are 0
But if your compare 1 with True and 0 with false, they are not equal (Try typing 1 in A1 and True in A2 and formula "=a1=a2" in A3, you'll get False
This is my understanding and experience based research, may be experts can share more knowledge on this.. thanks.
Regards,
DILIPandey
<click on below 'star' if this helps>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks