Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 162
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 109
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 162
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 162
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 162
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 162
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 162
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
double unary operator in XL 2007 Dave F Excel Discussion (Misc queries) 1 April 9th 07 05:04 PM
SUMPRODUCT- double unary vs. * Epinn Excel Worksheet Functions 2 November 4th 06 04:13 AM
Purpose of double negative M Moore Excel Discussion (Misc queries) 4 September 17th 06 07:38 PM
double unary s2m Excel Discussion (Misc queries) 5 August 24th 06 10:11 PM
Double if statement bastien86 Excel Worksheet Functions 1 June 14th 06 07:31 PM


All times are GMT +1. The time now is 05:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"