if with false outcome

Jan Kalop

Active Member
Joined
Aug 3, 2012
Messages
389
What is wrong if in worksheet "SUMS" in cell A1 value (from simple formula =SUM(A10:A20) is 9 and in worksheet "Totals" the same formula =SUM(SUMS!A10:A20) and with exactly
the same value 9 in cell C1, give false, when if in cell D1 of worksheet "Totals" is formula =IF(SUMS!A1=TOTALS!C1,"OK","??") and as result, it come ??.
I have check conditional formatting and many other combination and I can't fine what is wrong. Anybody can help with any suggestion, please.
Every value in A10:A20 in worksheet SUMS is with two decimal places and some are negative value.
All cells with SUM formula in both worksheets are formatted as number with two decimal places as well.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
formatting doesn't change decimals

decimals.png

maybe use --FIXED() function which has 2 decimals by default without any parameters
 
Upvote 0
It is quite likely a floating-point arithmetic issue. What happens if you try this formula instead?

=IF(ROUND(SUMS!A1,2)=ROUND(Totals!C1,2),"OK","??")
Yes ....thankyou very much, but I stiil do not understad why this is happening, because I have a lot of very similar calculation involve both worksheets and all working without any problem, but that one, cell A1 (worksheet SUMS) and C1 (worksheet Totals) gave me a headache.
 
Upvote 0
Did you read the article I linked to?
yes thanks, I am getting into, looks very complex and I don't know how I will digest that, anyhow not now because it is late at my place, but I will dig into tomorrow. Thanks for helping .
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,249
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top