The attached file has a problem that I seek help with.
The calculations are not correct and I am unable to work out why.
Can anyone offer advice please?
TIA, Leigh
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Calculation Funnies? (MS Excel/97)
I am not sure in what way the calculation is incorrect.
It seem to be doing what it should be. ie
with your figures in B15:C15 the max is greater than 0.46 and your formula gives 0.25
delete them and the max is not greater than 0.46 and the formula gives 0.5
What were you expecting to get?
I see at least three things wrong with your formula:
1- The first right parenthesis is in the wrong place. The correct place is:
=IF(MAX(C7:C10)>0.46,"0.25","0.5")
2- Your formula does not take binary conversion rounding errors into account. So, if you format cell C8 to a number and increase the number of decimal places displayed to 15, you will see that the actual value in that cell si 0.460000000000008. That is greater than 0.46 and therefore will cause the formula in F7 to return “.25” even though it looks like it should return “.5”. You could correct this like this:
=IF(ROUND(MAX(C7:C10),2)>0.46,"0.25","0.5")
3- Your IF statement is returning a string value, not a number value. That is fine if that is what you want, but if you want to use this cell in other calculations, the formula should read:
=IF(ROUND(MAX(C7:C10),2)>0.46,0.25,0.5)
Thanks for everyones’ replies.
I rushed to create the workbook and did put the closing bracket for the MAX function in the wrong place. (The PC I sent from did not have MS Excel to check before sending. What about Internet Explorer for reading Office files, I hear you ask… I forgot!)
I had heard about binary rounding but had not investigated it, but Legare’s response hit the nail right on the head, again.
I am grateful, Leigh
Curiouser and Curiouser!!
The formula worked just fine as it was for me! Until I re-wrote it elsewhere!!
If you look at the attached picture you will see that after deleting B15:C15, F7 gave the result 0.5 (as a number) but when I retyped the formula in F8 I got 0.25 as text!
Copying or dragging the formula still gives me the correct (but wrong?? ) result
Think that I will need stronger tablets now LOL
Are you sure that result is in F7 is a number and not text? On the original sheet, that cell is formatted to align right so text would look like a number. However, when I enter this formula in another cell:
=ISTEXT(F7)
The result is True.
Can’t tell why you got the different results without having the workbook to look at.
I did not think to look a cell alingment
The workbook was just as I opend it with Exporer, but I tried copying the cells over to excel proper and got the same effect.
copying the cell left it the same, but copying the formula from the edit bar and pasting it into another cell broke the thing!
Peter
The original MS Excel workbook (not the sample file posted by me) was actually intended to return text as both the True and False arguments. It relies on values being met to return the ‘text’ .
The solution came when Legare advised that the binary conversion could be allowed for by using the ROUND function. This did solve my particular case, mainly because the results in C7:C10 were not simple values, but the calculations returned from the values in B16:C18.
Many thanks for your input, Leigh
Thanks Alan
I did not have that option enabled as there is a need to use the figures as precisely as possible. In this case, that meant that a value of 0.46 had to be considered other than the MS Excel calculated value of 0.460000000…08
My problem was answered by Legare (and Bat17 raised an issue with the same formula) although you make a good point of which others need to be aware.
Leigh
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.