Cell data comparison not working

abdulhaque

Board Regular
Joined
Dec 2, 2015
Messages
63
Hi all,

I'm comparing two cells data (G50 and G66) to see if they're equal, each is calculated via a formula, and the results are not correct. The comparison formula is =IF(G50<>G66,1,0). Both cells data evaluates to £12499.00, so therefore I'm expecting the result of the comparison formula to be 0, instead I'm getting 1.

This comparison works elsewhere. The only difference between where it works and not is in how G50 and it's referenced cells are calculated. Any idea where it fails?

Where it doesn't work
G50 =SUM(G48:G49) = £12499.00
G48 =G46+G47
G49 =(G46+G47)*20%
G46 =G44*G45
G47 =Numerical entry, currency
G44 =SUM(G2:G43)
G45 =Numerical entry, currency
G2:G43 =Numerical entry, integers

G66 =SUM(G51:G65) = £12499.00
G51:G65 =IF(LEFT(A51,1) = "S", IF(H51="", " ", SUMIF(H$2:H$43,H51,G$2:G$43)*$G$45)*(1+F51), "")

Where it does work
G44 =SUM(G2:G43) = £5760.00
G2:G43 =Numerical entry, currency

G62 =SUM(G47:G61) = £5760.00
G47:G61 =IF(H47="", " ", SUMIF(H$2:H$43,H47,G$2:G$43))

=IF(G44<>G62,1,0) evaluates correctly to 0
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
I'm comparing two cells data (G50 and G66) to see if they're equal, each is calculated via a formula, and the results are not correct. The comparison formula is =IF(G50<>G66,1,0). Both cells data evaluates to £12499.00, so therefore I'm expecting the result of the comparison formula to be 0, instead I'm getting 1.

Are all decimals visible in G50 and G66?
 
Upvote 0
Hi there

I suspect the problem may lie with G49 - you are calculating 20%, and if that doesnt come out to a round number of pence there will be some rounding. Try setting the format of cells G50, G66 and G49 to General to see if they are completely the same value.
 
Upvote 0
I suspect the problem may lie with G49 - you are calculating 20%, and if that doesnt come out to a round number of pence there will be some rounding. Try setting the format of cells G50, G66 and G49 to General to see if they are completely the same value.

Thanks, upon changing to General format, there were differences in the decimals. I've rearranged my totals and checks to ignore the percentage calculations.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,893
Messages
6,181,616
Members
453,057
Latest member
LE102024

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