+ Reply to Thread
Results 1 to 7 of 7

Excel gives me weird 5-digit numbers.

  1. #1
    Registered User
    Join Date
    02-12-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007, 2013
    Posts
    89

    Excel gives me weird 5-digit numbers.

    I'm having a weird problem. Numbers that are supposed to show up as "X.XX" for instance "1.05" from my DDE feed instead show up as some weird 5-digit numbers, like so "XXXXX.XX", for example "27395.00".
    See attached picture for how it looks like.

    I suspect it has to do with formatting, I tried to Format the cell and set it to "General", "numbers" and pretty much every option there is but it still shows up wrongly.
    Attached Images Attached Images
    Last edited by Test123Test; 04-26-2013 at 11:10 AM.

  2. #2
    Registered User
    Join Date
    12-30-2011
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Excel gives me weird 5-digit numbers.

    Hi,

    Where you have "27395.00" what are you expecting to see? If they're bigger numbers I'd posit it's a calculation problem rather than a formatting one...

  3. #3
    Registered User
    Join Date
    02-12-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007, 2013
    Posts
    89

    Re: Excel gives me weird 5-digit numbers.

    The number is directly from a DDE-stream, and is supposed to show the bid and ask of a stock. I'm expecting to see the actual bid and ask of the stock, for instance for GOOGLE it would be 803.00 or something. Instead I see these 5-digit numbers that are way too high. Google certainly isn't valued at "27395.00"...

    NOTE: "27395" is just an example. After analyzing one number in spesific it seems that for instance 12785.00 represents 1.35 which is the correct ask-price. 41548.00 represents 1.10. Not seeing any logical patterns here.
    Last edited by Test123Test; 04-26-2013 at 10:43 AM.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,858

    Re: Excel gives me weird 5-digit numbers.

    Out of curiosity, I took 12785 and formatted as date and got january 1 1935, so there seems to be a "1-35" in this number. 41548 formatted as date yields October 1 2013 (I could back out 1-10 from this as well). I'm wondering if something in the data stream is making Excel treat these numbers as dates. Have you got a way of looking at the data stream directly (in a text editor or similar) so you can see the actual data being fed to Excel?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    02-12-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007, 2013
    Posts
    89

    Re: Excel gives me weird 5-digit numbers.

    Unfortunately no, but if you say the numbers can be backed out then probably it's an Excel problem, treating the numbers as dates.

    Here are some more examples: 10990.00 = 2.3
    1.15 = 42005

    Since you are able to extract the numbers what is the formula you are using for this? I could just apply it and it would at least be a workaround.

  6. #6
    Registered User
    Join Date
    02-12-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007, 2013
    Posts
    89

    Re: Excel gives me weird 5-digit numbers.

    I found the problem. My system separator is set to comma (,) for some reason. Setting it to period (.) instead made it work properly. No idea why that was a problem, but it's solved now.

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,858

    Re: Excel gives me weird 5-digit numbers.

    I'm not using a formula. I'm simply formatting the number as a date (something like mm/dd/yyyy) http://office.microsoft.com/en-us/ex...433.aspx?CTT=1 See this for a quick description of how Excel interprets numbers as dates. http://office.microsoft.com/en-us/ex...674.aspx?CTT=1 And I'm still not seeing a good pattern.

    Some ways of importing data into Excel (I'm most familiar with text data, so I know this is true for text data) allows you to specify the data type of column. Could you edit your data import so that this column comes in as text rather than general so that Excel will not try to convert it to a date?

    On edit: glad you figure it out. One can chase that kind of problem around all day and not find it.

+ 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