Remember Me? November 22nd 05, 08:01 PM posted to microsoft.public.excel.worksheet.functions What is the "--" used for - or how do I ask excel for help

There are many formulas that I see that have a "--". What are they used for,

Example

=IF(ISERR(--(A1)),LEFT(A1,MATCH(FALSE,ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LE
N(A1))),1)),0)-1),A1) November 22nd 05, 08:13 PM posted to microsoft.public.excel.worksheet.functions
 Ken Wright Posts: n/a What is the "--" used for - or how do I ask excel for help

You'll find an example he-

http://www.mcgimpsey.com/excel/formulae/doubleneg.html

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------

...
There are many formulas that I see that have a "--". What are they used
for,

Example

=IF(ISERR(--(A1)),LEFT(A1,MATCH(FALSE,ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LE
N(A1))),1)),0)-1),A1) November 22nd 05, 09:03 PM posted to microsoft.public.excel.worksheet.functions
 Sloth Posts: n/a What is the "--" used for - or how do I ask excel for help

Usually that is used instead of the VALUE function. It's a trick that takes
advantage of how Excel interprets text (or workaround depending on how you
think of it). It also can be used for boolean values (true or false). All
of the following result in the same value of 1.

=1
=--"1"
=--TRUE
=VALUE("1")

In your formula you are using the text function MID to extract the middle
number from a string of charectors. This results in a text string that must
then be converted to a number.

There are many formulas that I see that have a "--". What are they used for,

Example

=IF(ISERR(--(A1)),LEFT(A1,MATCH(FALSE,ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LE
N(A1))),1)),0)-1),A1)

 Thread Tools Search this Thread Show Printable Version Search this Thread: Advanced Search Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Posting Rules Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Similar Threads Thread Thread Starter Forum Replies Last Post Alain79 Excel Discussion (Misc queries) 4 June 14th 05 07:34 AM leinad512 Excel Discussion (Misc queries) 1 April 20th 05 04:19 PM Gary Brown Excel Worksheet Functions 0 April 15th 05 05:47 PM gxdata Setting up and Configuration of Excel 0 February 4th 05 03:44 AM cnuk Excel Discussion (Misc queries) 2 January 17th 05 08:07 PM

All times are GMT +1. The time now is 08:32 PM. Copyright ©2004-2020 ExcelBanter.