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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
=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,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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