IF statement for rounded values equalling to zero

abeginner

New Member
Joined
Jul 22, 2014
Messages
2
Hi,

I would really appreciate it if someone could help me please.

I've written an IF statement where I want the values to return true if all selected cells equal to zero and false if equal to anything else. The values are rounded to 2 decimal places. However, from 7 decimal places onwards it has other numbers. So for example, currrently it's showing like this:

A1 0.00
B1 0.00

However, if I take them to 7 decimal places it becomes like this (see below) so I guess this is the reason why it's not returning true as the cell in question isn't really zero.

A1 0.0000001
B1 0.0000007

My forumla is:

=IF(AND('Year AB'!G6460=0,'Year AB'!L6460=0,'Year AB'!M6460=0),"All columns are 0","Check for non-zero values")

It obviously is picking up the full value so keeps returning "Check for non-zero values." How can I write my IF statement so it only checks that it is equal to 0 to 2 decimal places (i.e. returning true for 0.00 or -0.00 but returning false for 0.01, 1.23 etc).

I tried to use ABS and ROUND but it didn't work for me and I can't figure out what I'm doing wrong.

Would be most grateful if someone could provide some help.

Many thanks,
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
=IF(Round(SUM('Year AB'!G6460,'Year AB'!L6460,'Year AB'!M6460),2)=0,"All columns are 0","Check for non-zero values")

Try that.
 
Upvote 0
Is it possible to have negative numbers? Because sum then has potential for error.
 
Upvote 0

Forum statistics

Threads
1,214,904
Messages
6,122,169
Members
449,070
Latest member
webster33

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