# Thread: Function to count numbers Thanks: 0 Likes: 0

1. ## Re: Function to count numbers

Originally Posted by Joe4
That is exactly what my formula already does.

Do you see that only one of those records meets that criteria? There is only one non-zero number that has 2 decimal places or less.

Also note that you need to be careful when it comes to checking decimal places. The formulas will check their ACTUAL values, not necessarily the DISPLAYED values.
For example, if you enter this in any cell:
=1/3
it will show you:
0.333333...

Now, if you format the cell to show two decimal places, it will return:
0.33
However, the REAL value has more decimal places, and the formula will look at that, not the displayed value.

If you remove all formatting and just set the Format to "General", you will see the real value the cell hold.
So be aware of this with your formulas.

If you wanted the real value in the cell to only hold two decimal places, you would need to use the ROUND function, i.e.
=ROUND(1/3,2)
or change the "Precision as Displayed" setting.

Hi Joe,

Thank you the round function worked, now it is giving me the correct result.

Thank you so much for your help.

Shab

2. ## Re: Function to count numbers

You are welcome.