PDA

View Full Version : Solved: Data Validation - Formula Question



gimli
12-13-2010, 06:53 AM
Hi,

I am using the following data validation formula for a cell.

=OR(AND((VALUE(MID(C2,5,4))>138),LEFT(C2,3)="389",RIGHT(C2,1)="S"),AND(LEFT(C2,3)<>"389",(VALUE(MID(C2,5,4))>200)))

My understanding is that if the formula returns a true value, the error window will pop up. For some reason this formula is not working as a data validation formula but works fine if I test it as a formula in a cell on the spread sheet.

any thoughts would be great.

mikerickson
12-13-2010, 07:12 AM
The rule for Validation formulas is to Allow values when the formula retunrns True.

Bob Phillips
12-13-2010, 07:17 AM
You have to use the DV in the C2 cell.

gimli
12-13-2010, 09:09 AM
Ok..so I changed the formula to this had it bass ackwards.

thanks much

=OR(AND((VALUE(MID(C2,5,4))<=138),LEFT(C2,3)="389",RIGHT(C2,1)="S"),AND(LEFT(C2,3)<>"389",(VALUE(MID(C2,5,4))<=200)))