+ Reply to Thread
Results 1 to 3 of 3

Wrong decimal value from Single data type

  1. #1
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Wrong decimal value from Single data type

    After running the following code, the cell value ends up being 1.10000002384185. I can get it to display 1.1, but I need the actual value to be 1.1. Why does it come up with that silly number?

    Please Login or Register  to view this content.
    Thanks for your help to a probably silly question.
    Last edited by natefarm; 05-11-2011 at 03:57 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Wrong decimal value from Single data type

    natefarm,

    Instead of using data type Single, use datatype Double:
    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar

  3. #3
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Wrong decimal value from Single data type

    Yes, that took care of it. Still not sure why Single didn't work, but thanks.

+ 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