COUNTIF - Formula Not Calculating Correctly...

wakerider017

Board Regular
Joined
Jun 10, 2015
Messages
77
I have no idea why the below formula is not working. Numbers in column A are formatted correctly as numbers.

This formula is in cell B2 and copied down to cell B6: =COUNTIF(A$2:A$6,"<"&A2)
An incorrect result is given in cell B5.

I manually typed the results I would expect in column C.

Any ideas??


[TABLE="width: 399"]
<tbody>[TR]
[TD="align: center"]
[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]Number[/TD]
[TD="align: center"]Incorrect Formula[/TD]
[TD="align: center"]Correct Result[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]-25.3576411748195[/TD]
[TD="align: center"]0[/TD]
[TD="align: center"]0[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]-8.47000433795198[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]2[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]-3.61982188879533[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]3[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]-9.68909643012068[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]9.50380974252980[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]4[/TD]
[/TR]
</tbody>[/TABLE]
 
Also if you copy the number from a5 into this as I've done

=IF(A5=-9.68909643012068,"Y","N")

the result is "N"

Maybe A5 isn't holding what it's actually displaying

=A5-9.68909643012068 produces

0.00000000000000 rather than 0
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Also if you copy the number from a5 into this as I've done

=IF(A5=-9.68909643012068,"Y","N")

the result is "N"

Maybe A5 isn't holding what it's actually displaying

=A5-9.68909643012068 produces

0.00000000000000 rather than 0

Nice observation. Very weird to me.

Also, been using this formula daily for a while now. First time I have ever run into the issue.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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