View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Norman Harker Norman Harker is offline
external usenet poster
 
Posts: 162
Default Excel - Double Negatives (Past, Present and Future)

Hi Denise!

"I would classify doing such things as being among the poorest
programming practices ever seen. It's no wonder a google search for
such things turned up nothing."

See the following thread for a discussion of this:

http://tinyurl.com/372zc

There are cases where it is essential; see especially the post of
Harlan Grove in that thread.

There are also other cases where we are parsing text:

A1:
Autumn2004

=RIGHT(A1,4)
Returns 2004 as text
=--RIGHT(A1,4)
Returns 2004 as a number

And you'll find that Google will throw up hundreds of threads. But
best results will be obtained if you search on "coerce" which is
usually why we are using --.
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia

Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"DennisE" wrote in message
...
As far as I can tell, Excel invariably compiles a double minus sign
as a plus
sign (and a triple minus sign as a minus, etc.). Thus if A1=4 and
B1=3,
C1=A1--B1 yields 7 and D1=A1---B1 yields 1. Although there is
nothing illegal
about it, I would classify doing such things as being among the
poorest
programming practices
ever seen. It's no wonder a google search for such things turned up
nothing.

-- Dennis Eisen