data validation formula

S

stuart noble

Using data validation I would like to apply 2 conditions to an entry in C1.
It must be numeric and B1 must be blank.
=AND(isblank(b1),isnumber(c1)) doesn't seem to work.
Any help appreciated.
 
P

Peo Sjoblom

If B1 gets the data from a formula you have to change it to something like
this

=AND(B1="",ISNUMBER(C1))
 
S

stuart noble

Peo Sjoblom wrote in message ...
If B1 gets the data from a formula you have to change it to something like
this

=AND(B1="",ISNUMBER(C1))
Thanks, Peo. No, B1 has no formula. I tried this variation but with the same
result. If B1 contains data, you can't enter text or numbers in C1, which is
fine. But if B1 is blank (and I've checked that it is), you can enter either
in C1, which is what I'm trying to prevent. Any further thoughts?
 
P

Peo Sjoblom

Stuart,

Sorry, I should have checked, this will do what you want

=AND(OFFSET(C1,,-1)="",ISNUMBER(C1))
 
S

stuart noble

Peo Sjoblom wrote in message ...
Stuart,

Sorry, I should have checked, this will do what you want

=AND(OFFSET(C1,,-1)="",ISNUMBER(C1))

Great!! Why referring to "the cell next to C1" works and B1 doesn't is a
mystery to me, but that applies to most of Excel. Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top