+ Reply to Thread
Results 1 to 6 of 6

Pasted text string appears as number with ten decimal places - How do I convert back ?

  1. #1
    Registered User
    Join Date
    07-18-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    30

    Pasted text string appears as number with ten decimal places - How do I convert back ?

    Hello,

    I have copied the the following text "26:1-4-3" [talking marks not present on the website] from a website into excel but all ways of copying it have resulted in it appearing as the number 41337.0840277778 in Excel (copied as HTML, as Unicode Text, as Text - these are the only 3 options). Is there a formula in Excel that will convert this number back to the text "26:1-4-3" ??

    I've viewed dozens of help files looking into ASCII, HEX2DEC but nothing seems to convert it back, would greatly appreciate some help out there.

    Thanks,
    Trent

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Pasted text string appears as number with ten decimal places - How do I convert back ?

    When I paste 26:1-4-3 into a cell Excel converts it to 42829.0840277778 which, when formatted, is 4/4/2017 2:01:00 AM.

    How it arrives at 42829.0840277778 I have no idea.



    Preformatting the destination cell as TEXT solved the issue.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Pasted text string appears as number with ten decimal places - How do I convert back ?

    Hi,

    I presume you are either using a Mac version of Excel or you have the option to use the 1904 date system set?

    The text is interpreted as the time value 26:01 on 4th March 2017. Since 26:01 is over 24 hours, you add one day and 2:01 to arrive at 5th March 2017 at 2:01. In the Mac / 1904 date system, that would convert to the value 41337.0840277778, or in the 1900 system it would be 42799.0840277778. Both assume that you are using a dd/mm/yyyy date regional format, which is why Tony's value is different- the 4-3 would be interpreted as April 3 rather than 4 March with mm/dd/yyyy settings.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Pasted text string appears as number with ten decimal places - How do I convert back ?

    One of the fringe benefits of being a MS MVP is that I have access to some of the most knowledgeable people on the planet wrt Excel.

    Like most groups of associated people we have our own private forum. So I asked about this in that forum and the answer that was offered is the same as yours.

    Excel thinks this: 26:1-4-3 is a date/time value.


  5. #5
    Registered User
    Join Date
    07-18-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Pasted text string appears as number with ten decimal places - How do I convert back ?

    The pre-formatting sheet to text & pasting as Text seems to have worked. Yes, I gathered that it tries to recognise a date but didn't know the difference in how xlnitwit describes. Very lucky to have both of you help me with this. I had actually been using data created in Excel for Mac onto a PC Office version so was all over the place. but the text pre-formatting looks the solution so thanks again

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Pasted text string appears as number with ten decimal places - How do I convert back ?

    You're welcome. Thanks for the feedback!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Adusting decimal places based on greatest number of places in a series
    By anelson87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2022, 01:05 PM
  2. [SOLVED] Converting a number with a specified number of decimal places into a string
    By lostest in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-21-2016, 09:38 AM
  3. [SOLVED] Need to limit the number of decimal places of a number in a text string
    By Turbo Dog in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-11-2013, 07:47 PM
  4. [SOLVED] copy number with 3 or more decimal places and paste the actual value as 2 decimal number
    By k1dr0ck in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-29-2013, 12:57 AM
  5. number to text but with only two decimal places
    By mjwillyone in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-19-2010, 09:34 PM
  6. Setting the number of decimal places for a text box.
    By Aaron1978 in forum Excel General
    Replies: 3
    Last Post: 03-08-2006, 01:10 PM
  7. Replies: 5
    Last Post: 12-08-2005, 04:25 PM

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