Consulting

Results 1 to 4 of 4

Thread: Solved: Data Validation - Formula Question

  1. #1

    Solved: Data Validation - Formula Question

    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.

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    The rule for Validation formulas is to Allow values when the formula retunrns True.

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You have to use the DV in the C2 cell.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    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(LEF T(C2,3)<>"389",(VALUE(MID(C2,5,4))<=200)))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •