+ Reply to Thread
Results 1 to 3 of 3

What is the "--" used for - or how do I ask excel for help

  1. #1
    Brad
    Guest

    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,
    or how do I ask Excel for help to read more about this topic.

    Example

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


  2. #2
    Ken Wright
    Guest

    Re: What is the "--" used for - or how do I ask excel for help

    You'll find an example here:-

    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 :-)
    ------------------------------*------------------------------*----------------


    "Brad" <[email protected]> wrote in message
    news:[email protected]...
    > There are many formulas that I see that have a "--". What are they used
    > for,
    > or how do I ask Excel for help to read more about this topic.
    >
    > Example
    >
    > =IF(ISERR(--(A1)),LEFT(A1,MATCH(FALSE,ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LE
    > N(A1))),1)),0)-1),A1)
    >




  3. #3
    Sloth
    Guest

    RE: 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.

    "Brad" wrote:

    > There are many formulas that I see that have a "--". What are they used for,
    > or how do I ask Excel for help to read more about this topic.
    >
    > Example
    >
    > =IF(ISERR(--(A1)),LEFT(A1,MATCH(FALSE,ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LE
    > N(A1))),1)),0)-1),A1)
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1