Jump to content
Sign in to follow this  
graphxwill

Javascript Calculator

Recommended Posts

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-

Screen-Shot-2014-01-23-at-3.24.32-PM.png

 

 

 

 

Screen-Shot-2014-01-23-at-3.24.53-PM.png

 

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?

 

 

Share this post


Link to post
Share on other sites

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 by jscriptnoob

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...