Hi Guys
In attached sample file I am trying to get F26 calculation...
The code does not error but the answer is an error...Any ideas
![]()
Please Login or Register to view this content.
Hi Guys
In attached sample file I am trying to get F26 calculation...
The code does not error but the answer is an error...Any ideas
![]()
Please Login or Register to view this content.
Good Luck...
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
Also....Add a comment if you like!!!!
And remember...Mark Thread as Solved...
Excel Forum Rocks!!!
Hi,
What do you mean by "answer is error"? Your code gave me the same result as manual calculations with formulas.
What is the correct answer?
Hi kasan
This is my result ... Office 2007, 2013
Untitled.png
I broke the calc down into parts (adding the following)
I Dimmed a,b and c as Double's![]()
Please Login or Register to view this content.
The problem seems to occur in (b), it correctly calculates a = 0.35 but then gets 0.35 / 60 as being 5.833333333E-03
? strange
If someone has helped you then please add to their Reputation
What makes you say it's an error output?
![]()
Please Login or Register to view this content.
That's not an error, just a small number.![]()
Please Login or Register to view this content.
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Hallo Trevor
Tx for putting me out of my misery lol...Please elaborate ...Edit... Now I get it ...Only noticed that all the calculations to follow after running Main code calculates as it should ...just a small number.
Small Magnitudes
For numbers with the smallest possible magnitude (closest to 0), Double variables can hold numbers as small as -4.94065645841246544E-324 for negative values and 4.94065645841246544E-324 for positive values.
Last edited by Sintek; 08-31-2018 at 07:49 AM.
@ kasan...
How did you achieve that ...Your code gave me the same result as manual calculations with formulas.
Well, to be exact, it's a small(ish) number with a lot of digits after the decimal point ... 6.15765106730372E-02.
Excel is limited to the number of digits it can display/handle.
If you round the result to, say, 15 digits after the decimal point, you get 0.061576510673037. That is,around six one hundredths (and a little bit)
In the code above, I rounded the result to 10 digits. It rather depends on what level of accuracy you need.
You're welcome. Thanks for the rep.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks