Forum Discussion

Eric_Marcus's avatar
Eric_Marcus
Copper Contributor
May 05, 2020
Solved

Data Validation with AND and OR

Hi All,   I would like to use data validation on a cell to ensure that it is either an "A" followed by 8 numbers OR starts with "A R".  I can do just the latter with =EXACT(LEFT(I5,3),"A R"). I c...
  • erol sinan zorlu's avatar
    erol sinan zorlu
    May 06, 2020

    Eric_Marcus 

    Try Below formula

     

    =OR(EXACT(LEFT(I5,3),"A R"),AND(EXACT(LEFT(I5,1),"A"),LEN(RIGHT(I5,LEN(I5)-1))=9,ISNUMBER(RIGHT(I5,LEN(I5)-1)*1)))

     

    I am using a different language version of Excel if this doesn't work please rewrite the formulas I gave on my first post seperately to be sure they run correctly and then combine them.

Resources