danhodges99
New Member
- Joined
- Apr 22, 2009
- Messages
- 12
Hi all,
I hope you can help, this is driving me crazy. I'm sure the answer is out there somewhere but I none of search terms I've used seem to lead me to it. Should be a simple one for this community...
I've got a spreadsheet which essentially calculates profit and loss on certain items, but seems to behave slightly differently on some rows than others. Simple example:
Row 3.... Bought for 4000000, Sold for 4100000. Simple formula then subtracts the Bought cost from the Sold cost and should give me 100000. However, it's giving me 99999.9999999995.
Another example
Row 26... Bought for 7900000, Sold for 8200000. Shoud give me 300000. Same problem, it's actually giving me 299999.9999999999 this time.
The Bought for and Sold for columns are themselves upscaled by multiplying a manually-entered figure by 10000000. For example, for Row 3 above, the 4000000 figure is generated by 4.0*1000000.
This seems to be the cause of the problem - if I manually enter 4000000 and 4100000 instead of letting the numbers be upscaled it all works perfectly.
Having said that, when I use the upscaled numbers as the source, they are all 'clean' and correct when I when I look in the 'evaluate formula' option, so I don't understand why it's giving me the wrong result.
Some might say that I should just manually enter the numbers in the upscaled format to workaround this issue, but the point is that I shouldn't have to - it's inconvenient when it's a simple sum that should just work!
I hope someone has come across this before and can tell me what I'm doing wrong - many thanks!
I hope you can help, this is driving me crazy. I'm sure the answer is out there somewhere but I none of search terms I've used seem to lead me to it. Should be a simple one for this community...
I've got a spreadsheet which essentially calculates profit and loss on certain items, but seems to behave slightly differently on some rows than others. Simple example:
Row 3.... Bought for 4000000, Sold for 4100000. Simple formula then subtracts the Bought cost from the Sold cost and should give me 100000. However, it's giving me 99999.9999999995.
Another example
Row 26... Bought for 7900000, Sold for 8200000. Shoud give me 300000. Same problem, it's actually giving me 299999.9999999999 this time.
The Bought for and Sold for columns are themselves upscaled by multiplying a manually-entered figure by 10000000. For example, for Row 3 above, the 4000000 figure is generated by 4.0*1000000.
This seems to be the cause of the problem - if I manually enter 4000000 and 4100000 instead of letting the numbers be upscaled it all works perfectly.
Having said that, when I use the upscaled numbers as the source, they are all 'clean' and correct when I when I look in the 'evaluate formula' option, so I don't understand why it's giving me the wrong result.
Some might say that I should just manually enter the numbers in the upscaled format to workaround this issue, but the point is that I shouldn't have to - it's inconvenient when it's a simple sum that should just work!
I hope someone has come across this before and can tell me what I'm doing wrong - many thanks!