![]() |
#1
|
|||
|
|||
![]()
Hi Folks
Not sure if this has already been posted. I have set up two variables as double in an excel macro and populated them with two values from cells in the workbook. Using Msgbox I print out the variables and get the expected values of 14.1 and 14.1. I use a further Msgbox to print out the difference between the two variables (variable 1 - variable 2) and I get -1.77635683940025E-15 I was expecting this to be zero. I have tried recreating the excel file and making sure that the cells are all formatted as numbers with 1 decimal place. I have tried setting the variables to zero immediately before inserting the values. This is in a loop and other values are correct. What am I doing wrong? |
Tags |
cell value, excel macro |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Kebap | Word VBA | 7 | 09-21-2018 03:14 PM |
Returning text, date, time, location from one Excel sheet to another | dave57 | Excel | 17 | 06-15-2017 10:45 AM |
![]() |
SteveL | Excel | 1 | 05-06-2015 02:09 AM |
![]() |
marceepoo | Word VBA | 1 | 12-20-2012 03:12 PM |
need macro for quiz (?) repeat of wrong answers with shuffle | braveshark | PowerPoint | 0 | 10-02-2012 06:10 AM |