Forum Discussion

mikeblogg's avatar
mikeblogg
Copper Contributor
Sep 24, 2022
Solved

Data validation - allow a specific character OR range of numbers?

Hi, I'm trying to restrict values entered into a cell to "x", "/", or a whole number in the range of 5 to 29. I have worked out how to do it using a drop-down list, but I'd prefer to not have the dro...
  • HansVogelaar's avatar
    HansVogelaar
    Sep 24, 2022

    mikeblogg 

    Change the formula to

    =OR(H2="x",H2="/",ISNUMBER(MATCH(H2,SEQUENCE(25,,5),0)))

    or

    =OR(H2="x",H2="/",ISNUMBER(MATCH(H2,ROW($5:$29),0)))

Resources