Formula for if a cell does not equal 0

andrewb90

Well-known Member
Joined
Dec 16, 2009
Messages
1,077
I am looking for a formula for if B2,C2, or D2 does not equal 0, after that my data validation should work.

Thanks,

Andrew
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
try
Code:
=IF(OR(B2<>0,C2<>0,D2<>0),"do your stuff","don't do your stuff")
 
Upvote 0
I tried this one:

=IF(OR(K39<>0,L39<>0,M39<>0),"do your stuff","don't do your stuff")
(changed it to K,L,M)
I have allow: whole number
Data: Not equal to
and ignore blank checked

Now when I type anything into the cells with the validation, nothing happens until I type a letter instead of a number.
I'm a little confused by that.
 
Upvote 0
I keep trying to change the allow settings, but regardless, I don't seem to get what I want.
 
Upvote 0
Hang on......are you trying to put the formula into the Data Validation ??
 
Upvote 0
No, can't do that !!
Data Validation input is based on the conditions you set relative to that cell, not to the results of another cell.
If I understand correctly, you will have to write a formula for the cell that allows for certain conditions in other cells.
So,if you want the conditions in your cell to be governed by this
Code:
=IF(OR(B2<>0,C2<>0,D2<>0)
you will have to develop a formula to suit.

If the above is true, what do you want the user to insert into the DV cell ??
If false, also, what do you want in the DV cell ??
 
Upvote 0
Ok, What I am trying to do is this:
in cells K42:M46 I want a popup box to appear when the user starts entering data into it IF:
K39 or L39 or M39 DO NOT equal '0'
Basically in those cells I have an formula that checks several numbers entered into the sheet, and if the result does not balance to 0, then a mistake in entering was made, and the user needs to be alerted so they can check it themselves.
Does this make sense to you?

Thanks,

Andrew
 
Upvote 0
So in the cells K42 to M46, why not use the formula
Code:
=IF(OR(K39<>0,L39<>0,M39<>0),"Balance error","")
"Balance Error" will then appear in all cells that contain the formula, if the above conditions are true, otherwise the cell will be blank.
 
Upvote 0

Forum statistics

Threads
1,214,594
Messages
6,120,436
Members
448,964
Latest member
Danni317

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