+ Reply to Thread
Results 1 to 3 of 3

understanding dash dash in a excel formula

  1. #1
    ldebner
    Guest

    understanding dash dash in a excel formula

    I have come across a function I do not understand.
    1.
    Input
    Thursday, October 27, 2005 8:59:09 AM

    Formula
    =(--RIGHT(B2,LEN(B2) - (FIND(",",B2)+1)))

    Result (this is the result I wanted)
    10/27/05 8:59 AM

    2.
    Input
    Thursday, October 27, 2005 8:59:09 AM

    Formula
    =(RIGHT(B3,LEN(B3) - (FIND(",",B3)+1)))

    Result ( this is not the result i wanted)
    October 27, 2005 8:59:09 AM

    Why does putting "--" before "RIGHT" give me the desired result?




  2. #2
    Bob Phillips
    Guest

    Re: understanding dash dash in a excel formula

    See http://www.xldynamic.com/source/xld....CT.html#format

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "ldebner" <[email protected]> wrote in message
    news:[email protected]...
    > I have come across a function I do not understand.
    > 1.
    > Input
    > Thursday, October 27, 2005 8:59:09 AM
    >
    > Formula
    > =(--RIGHT(B2,LEN(B2) - (FIND(",",B2)+1)))
    >
    > Result (this is the result I wanted)
    > 10/27/05 8:59 AM
    >
    > 2.
    > Input
    > Thursday, October 27, 2005 8:59:09 AM
    >
    > Formula
    > =(RIGHT(B3,LEN(B3) - (FIND(",",B3)+1)))
    >
    > Result ( this is not the result i wanted)
    > October 27, 2005 8:59:09 AM
    >
    > Why does putting "--" before "RIGHT" give me the desired result?
    >
    >
    >




  3. #3
    Gary''s Student
    Guest

    RE: understanding dash dash in a excel formula

    The double dash is just a way to convert string to number. The differences
    you see may be just formatting. the value should be:

    38652.3744097222

    to account for the 9 seconds.

    --
    Gary''s Student


    "ldebner" wrote:

    > I have come across a function I do not understand.
    > 1.
    > Input
    > Thursday, October 27, 2005 8:59:09 AM
    >
    > Formula
    > =(--RIGHT(B2,LEN(B2) - (FIND(",",B2)+1)))
    >
    > Result (this is the result I wanted)
    > 10/27/05 8:59 AM
    >
    > 2.
    > Input
    > Thursday, October 27, 2005 8:59:09 AM
    >
    > Formula
    > =(RIGHT(B3,LEN(B3) - (FIND(",",B3)+1)))
    >
    > Result ( this is not the result i wanted)
    > October 27, 2005 8:59:09 AM
    >
    > Why does putting "--" before "RIGHT" give me the desired result?
    >
    >
    >


+ 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