Data validation with LOOKUP condition not working for empty cell

tfdd

New Member
Joined
Jan 30, 2021
Messages
5
Office Version
  1. 2013
Platform
  1. Windows
Hello,

I want to validate the cell F3 entry if the following condition is met: OR(AND(F3="";I10>0);LOOKUP(F3;D7:F11;3;0)>0)

Meaning that if the cell F3 is empty, it will check if I10>0, if not, it will search for its correspondance in the area from D7 to F11 and check if it is bigger than 0

If I only use this formula: AND(F3="";I10>0) and the cell F3 is empty it validates the entry, since I 10 is bigger than 0

But if I use the formula OR(AND(F3="";I10>0);LOOKUP(F3;D7:F11;3;0)>0)

It only works if the cell F3 is not empty, if it is empty, it doesn't work, since it doesn't validate the entry as it was supposed to.

I think it has to do with the fact that when the cell F3 is empty, it uses the formula LOOKUP and it shouldn't, since it´s not applicable in this condition and so it doesn't validate the entry based on an error in the formula.

How to solve this in order to produce the correct output?

Thanks.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Not sure if I'm following what you want correctly, try
Excel Formula:
AND(I10>0;IFNA(LOOKUP(F3;D7:F11;3;0)>0;FALSE))
 
Upvote 0
F3;D7:F11;3;0
That formula is not working in data validation rule.

The goal is to only allow data to be entered into cell F3 if the result of the following formula is >0

IF.ERROR(LOOKUP(F3;D7:F11;3;0);I10)

If cell F3 is empty, it will check if I10 >0, if not empty, it will check if the coresponding value from the area B4:C6 is >0.

I don't know how to create a rule for this, since when the F3 is empty, the lookup is also used and creates an error.
 
Upvote 0
Already found the solution to put in the data validation rule:

Excel Formula:
=ifna(lookup(f3;d7:f11;3;0)>0;i10>0)
 
Upvote 0

Forum statistics

Threads
1,214,845
Messages
6,121,902
Members
449,053
Latest member
Guy Boot

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