Forum Discussion
excel calculation not equalling what it should?
- Dec 12, 2024
Change the formula to
=IF(F13<>"", ROUND(F13-E13, 2), "")
or
=IF(F13<>"", ROUND(F13, 2)-ROUND(E13, 2), "")
Thanks for your reply, I have only just found it as the mail notification went straight to Junk folder!
Cell E12 contains a formula to calculate a result.
Cell F12 is a data entry only.
Can I apply the Round function with an existing formula in same cell?
Yes, change
=expression
to
=ROUND(expression, 2)
- Spike_01Dec 12, 2024Copper Contributor
here is the formula i have
=IF(F13<>"",(F13-E13),"")
- HansVogelaarDec 12, 2024MVP
Change the formula to
=IF(F13<>"", ROUND(F13-E13, 2), "")
or
=IF(F13<>"", ROUND(F13, 2)-ROUND(E13, 2), "")
- Spike_01Dec 12, 2024Copper Contributor
Hans your're a genius!! the second option was the solution that worked, the first just left the cell blank?
I'll be sure to remember the advice I have received by all on the ever decreasing decimals that Excel uses.
Great help, thanks all.
- Spike_01Dec 12, 2024Copper Contributor
Hi Hans,
The Expression i presume is the formula which in this case is an IF function, I am not sure how it should be written?
- mathetesDec 13, 2024Gold Contributor
Your presumption is correct.
=ROUND(full_IF_function,2)
I'm going to assume you're something of a beginner with Excel. One of the things new users can benefit from is giving yourself permission to "Play" -- by which I mean "experiment" or "try things out." You're not going to break anything. Even advanced users often need to build a formula in parts, adding new features, experiencing error messages that say, in effect, "Go back a step," "try that one component by itself" and so forth.
The best way to learn, in Excel as in many aspects of life, is through trial and error.
- Spike_01Dec 13, 2024Copper Contributor
Hi Mathetes,
I have made some different basic forms over the years but would really like to get a better developed understanding and possibly go on to macros/vba coding at some point.
if you see my previous reply to Hans. It was the second formula that worked, I tried the =round( if function,2) but that did not work. As you say it is trial and error that’s best way to learn but having a forum like this allows for some excellent pointers and direction on my limited knowledge.