Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Purpose of Double Unary in AND Statement
Hello,
The AND statement is as follows: =and(--d2--c2,--c2--b2m--b2--a2). What's the purpose of the double unary here? Thanks! |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Purpose of Double Unary in AND Statement
Daren
The -- can be used to cause Excel to convert strings that look like numbers to numbers; which will allow the numeric calculations to work. It serves the same purpose as the N() function. That would be my guess. Ken On Oct 29, 5:11*pm, Daren wrote: Hello, The AND statement is as follows: =and(--d2--c2,--c2--b2m--b2--a2). * What's the purpose of the double unary here? Thanks! |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Purpose of Double Unary in AND Statement
It could be because the referenced cells contain TEXT numbers. The "--" will
coerce TEXT numbers to NUMERIC numbers. -- Biff Microsoft Excel MVP "Daren" wrote in message ... Hello, The AND statement is as follows: =and(--d2--c2,--c2--b2m--b2--a2). What's the purpose of the double unary here? Thanks! |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Purpose of Double Unary in AND Statement
When Excel is asked to do an arithmetic operation ( add, multiply, etc)
Boolean values (True or False), it treats TRUE as 1 and False as 0. The double negation (please note that ++ is also double unary) is one such arithmetic operation. It does the same thing if the cell has text that can be represented as a number. But it is not clear what the purpose is in the example. Can you tell us what is in the cells? best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Daren" wrote in message ... Hello, The AND statement is as follows: =and(--d2--c2,--c2--b2m--b2--a2). What's the purpose of the double unary here? Thanks! |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Purpose of Double Unary in AND Statement
If A2:B2 contain text which looks like dates, the double unary minus will
convert them to real dates. Note also that your formula has an m that ought to be a comma. Note also that "double unary" by itself isn't a very specific term: -- is a double unary minus ++ would be a double unary plus. -- David Biddulph "Daren" wrote in message ... Hello, The AND statement is as follows: =and(--d2--c2,--c2--b2m--b2--a2). What's the purpose of the double unary here? Thanks! |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Purpose of Double Unary in AND Statement
David,
Can I be a nit-picker? In (4 - 2) we are have 4 minus 2 (or 4 subtract 2) but in -4 we are not doing any subtraction, rather we are negating 4 (in -x this amounts to changing the sign of x) So I like to use the term "double negation" or "double unary negation" but since negation is a unary op the middle word is redundant Sorry, but in retirement I must be missing my students to pick on !!! best wishes from Canada -- Bernard "David Biddulph" <groups [at] biddulph.org.uk wrote in message ... If A2:B2 contain text which looks like dates, the double unary minus will convert them to real dates. Note also that your formula has an m that ought to be a comma. Note also that "double unary" by itself isn't a very specific term: -- is a double unary minus ++ would be a double unary plus. -- David Biddulph "Daren" wrote in message ... Hello, The AND statement is as follows: =and(--d2--c2,--c2--b2m--b2--a2). What's the purpose of the double unary here? Thanks! |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Purpose of Double Unary in AND Statement
Those cells have dates in them. They're supposed to be formatted as
3/14/2001 but sometimes they have an extra slash in them, so I change them with find/replace to format as 3/14/2001 "Bernard Liengme" wrote: When Excel is asked to do an arithmetic operation ( add, multiply, etc) Boolean values (True or False), it treats TRUE as 1 and False as 0. The double negation (please note that ++ is also double unary) is one such arithmetic operation. It does the same thing if the cell has text that can be represented as a number. But it is not clear what the purpose is in the example. Can you tell us what is in the cells? best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Daren" wrote in message ... Hello, The AND statement is as follows: =and(--d2--c2,--c2--b2m--b2--a2). What's the purpose of the double unary here? Thanks! |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Purpose of Double Unary in AND Statement
Thanks.
"Bernard Liengme" wrote: When Excel is asked to do an arithmetic operation ( add, multiply, etc) Boolean values (True or False), it treats TRUE as 1 and False as 0. The double negation (please note that ++ is also double unary) is one such arithmetic operation. It does the same thing if the cell has text that can be represented as a number. But it is not clear what the purpose is in the example. Can you tell us what is in the cells? best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Daren" wrote in message ... Hello, The AND statement is as follows: =and(--d2--c2,--c2--b2m--b2--a2). What's the purpose of the double unary here? Thanks! |
#9
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Purpose of Double Unary in AND Statement
Thanks!
" wrote: Daren The -- can be used to cause Excel to convert strings that look like numbers to numbers; which will allow the numeric calculations to work. It serves the same purpose as the N() function. That would be my guess. Ken On Oct 29, 5:11 pm, Daren wrote: Hello, The AND statement is as follows: =and(--d2--c2,--c2--b2m--b2--a2). What's the purpose of the double unary here? Thanks! |
#10
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Purpose of Double Unary in AND Statement
Thanks!
"T. Valko" wrote: It could be because the referenced cells contain TEXT numbers. The "--" will coerce TEXT numbers to NUMERIC numbers. -- Biff Microsoft Excel MVP "Daren" wrote in message ... Hello, The AND statement is as follows: =and(--d2--c2,--c2--b2m--b2--a2). What's the purpose of the double unary here? Thanks! |
#11
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Purpose of Double Unary in AND Statement
Thanks.
"David Biddulph" wrote: If A2:B2 contain text which looks like dates, the double unary minus will convert them to real dates. Note also that your formula has an m that ought to be a comma. Note also that "double unary" by itself isn't a very specific term: -- is a double unary minus ++ would be a double unary plus. -- David Biddulph "Daren" wrote in message ... Hello, The AND statement is as follows: =and(--d2--c2,--c2--b2m--b2--a2). What's the purpose of the double unary here? Thanks! |
#12
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Purpose of Double Unary in AND Statement
You're welcome!
-- Biff Microsoft Excel MVP "Daren" wrote in message ... Thanks! "T. Valko" wrote: It could be because the referenced cells contain TEXT numbers. The "--" will coerce TEXT numbers to NUMERIC numbers. -- Biff Microsoft Excel MVP "Daren" wrote in message ... Hello, The AND statement is as follows: =and(--d2--c2,--c2--b2m--b2--a2). What's the purpose of the double unary here? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
double unary operator in XL 2007 | Excel Discussion (Misc queries) | |||
SUMPRODUCT- double unary vs. * | Excel Worksheet Functions | |||
Purpose of double negative | Excel Discussion (Misc queries) | |||
double unary | Excel Discussion (Misc queries) | |||
Double if statement | Excel Worksheet Functions |