Locking Cell dependent on Another Cell Value

G

Guest

I've used Data Validation on cell B1 (allow=custom/formula =A1>0) for my
application to allow entry on B1, however I also need to ensure the allowed
data entry on B1 is a decimal value.

Is there something I can add in the data validation to ensure a decimal
value entry?

Pls help.
 
G

Guest

Hey, Ur Q is not proper, if u want only decimal validation u can select
Deceimal from Data Validation - > Allow column.
if you r looking something else, pls clear ur Q
 
G

Guest

I'm not sure if I phrase my original question properly.

I have cell A1 and B1. B1 entry is dependent upon entry on A1. Data
Validation is defined in B1.

a) If A1 is populated with an entry of greater than 0 then I want B1 locked
out (no entry is possible).
b) However, if A1 is = or < 0 then I want B1 populated with a numeric entry
in decimal value.

I'm able to do a) based on my Data Validation entry below but not b).
Is there something in the "Formula" that I can use to satisfy b) also?

Thanks.
 
G

Guest

Try this one in the "Formula":

=AND(A1>0,INT(B1)<>B1)
this will check A1 is >0 and B1 is entered decimal value.
or

=AND(A1>0,B1>0)
this will check both cell is decimal value


please do rate
 
G

Guest

Muhammed,

The formula works individually but not with the "AND".

=A1>0 works ok by itself in the formula box
=INT(B1)<>B1 works ok by itself in the formula box
=B1>0 works ok by itself in the formula box

But they don't work when combined using the "AND" function.

Am I doing something wrong?

Thanks for you patience.
 
G

Guest

Its working for me, u just copy
=AND(A1>0,INT(B1)<>B1)
and paste to "Confitional formatting formula area
 
D

Debra Dalgleish

In your second message you said B1 should be locked if A1>0. If that's
what you want, then this data validation should work in cell B1:

=AND(A1<=0,INT(B1)<>B1)

You may also want to remove the check mark for Ignore Blank, or you'll
be able to enter anything in cell B1 if A1 is blank.
 
G

Guest

Debra and Muhammed,

Yes they worked, it was an operator error on my side.

Thanks much.
 

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