Data Validation to restrict blank value in adjacent field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Team,
Try this:
In cell A1, add following "custom" validation:
=not(isblank(b1))

As I see it, this should restrict leaving cell A1 unless cell B1 already has
a value.

I've also tried =b1<>"" and some others. Should be simple but I can't get
it to work. Validation will not fire. For each equation I've tried, I've
cut and pasted the same equation into a field and it works fine.

Thanks.
 
Your first works, so does your second. You just need to deselect "ignore
blank" in the setup dialogue box
 
Peo and Debra,
Thanks to both of you for your responses.

I'm just trying to understand this to forestall my embarrassment of such an
easy solution. I interpreted "Ignore blank" as "Do not fire the validation
in this field should you happen to be leaving this field while it is blank."
If one interprets it as such, this solution, while I see it works, shouldn't
make a difference.

Please explain how you two knew this.

Thanks again.
 
In some cases, you may want blank cells to be ignored, so you'd leave
the check mark in the Ignore Blank option.

In your example, you want to check for a blank cell, and prevent an
entry in cell A1 if cell B1 is blank.
So, you turn off the Ignore Blank option so the data validation can test
for the blank cell.
 
I am sure I learned it through trial and error. I remember I thought I was
smart when I came up with this solution

=OFFSET(A1,,1)<>""


which will work without deselecting the check box.

Then I found out about removing the check mark

Many people interpret it as though you can force a user to enter something
in the cell with validation if you leave it remove the check mark . Frankly
I don't think I even noticed it when I started using validation.
 
Back
Top