Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
What does "=--([Cell Reference])" do?
I've seen some posts referencing a spreadsheet function I've never seen
before. The function is two dashes "--" followed by a cell or range reference. I've played with it a little bit, but can't find out exactly what it is supposed to do, because it does different things in different places. I'm not using it for anything, I just like to learn new things. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
What does "=--([Cell Reference])" do?
The double unary minus (--) converts TRUE and FALSE values to 1s and
0s respectively, so that they can be used in normal arithmetic. It can also be used to convert numbers which are text values into proper numbers. Hope this helps. Pete On Sep 18, 4:10*pm, Ssverret wrote: I've seen some posts referencing a spreadsheet function I've never seen before. *The function is two dashes "--" followed by a cell or range reference. *I've played with it a little bit, but can't find out exactly what it is supposed to do, because it does different things in different places. * I'm not using it for anything, I just like to learn new things. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
What does "=--([Cell Reference])" do?
That is actual double negation. It is used to coerce non numbers into numbers
or to coerce true / false into 1 and 0. You can do the same thing by multiplying by 1 or such but the nice part of double negation is that it is an immediate clue that you need to coerce something to a number as opposed to perform a mathematic operation to it. -- HTH... Jim Thomlinson "Ssverret" wrote: I've seen some posts referencing a spreadsheet function I've never seen before. The function is two dashes "--" followed by a cell or range reference. I've played with it a little bit, but can't find out exactly what it is supposed to do, because it does different things in different places. I'm not using it for anything, I just like to learn new things. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
What does "=--([Cell Reference])" do?
"Pete_UK" wrote: The double unary minus (--) converts TRUE and FALSE values to 1s and 0s respectively, so that they can be used in normal arithmetic. It can also be used to convert numbers which are text values into proper numbers. Hope this helps. Pete On Sep 18, 4:10 pm, Ssverret wrote: I've seen some posts referencing a spreadsheet function I've never seen before. The function is two dashes "--" followed by a cell or range reference. I've played with it a little bit, but can't find out exactly what it is supposed to do, because it does different things in different places. I'm not using it for anything, I just like to learn new things. Thanks for your help Pete and Jim, I tried it a few times and it worked perfectly. I had a previous method for turning text into numbers, but this one is better. Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
can lookup return cell reference istead of "text" for sumif? | Excel Worksheet Functions | |||
Copying formulas using "+" cell reference causes r1c1 in linked sh | Excel Discussion (Misc queries) | |||
How do I reference a cell as PART of a vlookup "Table_Array" locat | Excel Worksheet Functions | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) |