Data Validation assistance desperately needed

L

laura

I have a spreadsheet in which

A1 has the option of two descriptions (buy or sell) filled
in through a drop down text box.

A2 requires a number entered. I would like to use data
validate to ensure:

if A1 = Buy, A2 must be positive
if A2 = Sell, A2 must be negative

Any help is most appreciated!
 
J

Jason Morin

With A2 selected, go to Data > Validation. Select "Custom"
and under "Formula", insert:

=OR(AND(A1="Buy",A2>0),AND(A1="Sell",A2<0))

HTH
Jason
Atlanta, GA
 
L

Laura

-----Original Message-----
With A2 selected, go to Data > Validation. Select "Custom"
and under "Formula", insert:

=OR(AND(A1="Buy",A2>0),AND(A1="Sell",A2<0))

HTH
Jason
Atlanta, GA

.
Jason - you are genius and my hero! Thank you very 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