Data Validation assistance desperately needed

  • Thread starter Thread starter laura
  • Start date Start date
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!
 
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
 
-----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!
 
Back
Top