graphxwill Posted January 23, 2014 Share Posted January 23, 2014 Hi, I am building some javascript calculators that must calculate according to an excel doc with formulas ; ie, (it must have same answers as excel sheet). I am fairly new at javascript but have gotten pretty far. The problem that im having is that the answers that my javscript calculators are producing arent exactly the same as the Excel formulas. (but very close) Example: Javascript Calculator- https://wzsdesign.com/WebTemplWP1/cal6.html Excel Formulas- If you take a look at the link with the javascript calculator and input the same numbers as the screen shot you will notice that there a small differences in the answers. Can someone please help? Link to comment Share on other sites More sharing options...
jscriptnoob Posted January 24, 2014 Share Posted January 24, 2014 (edited) Your issue it seems in in cell G91. Whatever formula you have there is rounding your number up to what appears to be the nearest whole number. Whereas your javascript formula rounds down. Otherwise the values are all the same when an "output" is required. That leaves G91 being the only difference. I could be wrong, but I'd start there and see if there's a discrepancy between the two formulas. What are you using to convert the excel to javascript? Edited January 24, 2014 by jscriptnoob Link to comment Share on other sites More sharing options...
graphxwill Posted January 24, 2014 Author Share Posted January 24, 2014 Wish I knew of something that did convert. I stumbled upon a bit of code that was quite useful and have been trying to build from there. Thank you for your post, you are right about G91and I will be digging in to that tonight. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now