data validation

P

pierre

hello
concerning data validation......
i have the following :

A B C
1 debit 4619 ......


what should i enter in order to say :
if A1=debit and B1=4619 allow only positive numbers in cell C1

THANKS
 
G

gt

Hi Pierre:

Go to excel help and enter this into the search box: "Prevent invalid data
entry in a worksheet" See if that helps.

cheers,
gt
 
T

T. Valko

Select cell C1
Goto Data>Validation
Allow>Custom
Formula:

=AND(A1="debit",B1=4619,COUNT(C1),C1>0)

Or, if 0 is a valid entry:

=AND(A1="debit",B1=4619,COUNT(C1),C1>=0)

OK out
 
P

pierre

please...again with data validation
how to say...: allow any word which start with "R" in cell a1
: prevent any word which start with "d " in cell b1

THANK YOU SIR IN ADVANCE......
 
T

T. Valko

My friend....

How about telling us what you really want the first time instead of changing
what you want after you get replies?

You have a habit of doing this.

I'll gladly help you as much as I can but I get "mad" when people don't ask
for what they really want. This always leads to a long and unnecessary sting
of follow-up replies. I spend *my time* answering the question as posted and
then it turns out that's not *REALLY* what they wanted! ARGH!

Now that I've "yelled" at you, please tell us what you *REALLY* want. Don't
use "make believe" scenarios!
 
P

pierre

i am very sorry for this inconvinience,....

the second post i just sent wasnt in purpose to misslead you...sorry i
should have precised it better than this....it was another issue.
again for data validation :

1) how to say...: allow any word which start with letter "R" in cell a1

2) what to do in case i would like to prevent any word which start with
letter "d" to appear in cell B1

how to do that ?

SORRY AGAIN .......and please accept my apologies
 
T

T. Valko

Ok, if these are separate conditions...
1)... allow any word which start with letter "R" in cell a1

Assuming that numbers are invalid:

=LEFT(A1)="R"

Now, this will allow entries of strings that start with "R" or only the
single letter "R". Is the single letter "R" a valid entry? If not, use this:

=AND(LEFT(A1)="R",LEN(A1)>1)
2)... prevent any word which start with letter "d" to appear in cell B1

Assuming that numbers are invalid:

=AND(ISTEXT(B1),LEFT(B1)<>"D")
 

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