Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ldebner
 
Posts: n/a
Default 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   Report Post  
Bob Phillips
 
Posts: n/a
Default 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" wrote in message
...
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   Report Post  
Gary''s Student
 
Posts: n/a
Default 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
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
Why does Excel show a formula in ONE cell ? edpaul Excel Discussion (Misc queries) 1 August 12th 05 07:29 PM
Excel CHALLENGE...3 questions(indirect,rank,array formula)... Mlowry Excel Worksheet Functions 8 August 1st 05 07:34 AM
converting formula from lotus.123 to excel zaharah Excel Worksheet Functions 2 July 27th 05 03:04 PM
How do I get the formula bar in excel 2003 unionhall Excel Discussion (Misc queries) 1 February 17th 05 11:10 AM
Suddenly Excel can't calculate formula!!! Bob H Excel Worksheet Functions 2 November 30th 04 09:35 PM


All times are GMT +1. The time now is 11:53 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"