Data Validation??

  • Thread starter Thread starter Joe Gieder
  • Start date Start date
J

Joe Gieder

I have tried looking through other threads and maybe it's
there but I can't find it. What I'm trying to do is limit
what is input into a cell, I only want to be able input a
number (any number) or only the letters "stk" and nothing
else. Can this be done through Data Validation (or
something else) or would I have to try to figure out some
VB code (not good here)?

TIA for your help

Joe
 
Hi

Select the range (p.e. A1:A10), select custom validation (from
Data.Validation), and into formula field enter
=OR(ISNUMBER(A1),A1="stk")
and then press OK
For all fields in range A1:A10 are allowed only numbers, "stk", and empty
cell.
 
Thanks Arvi. I followed what you said and it works but I
didn't mention (sorry) that I had a custom format:
0 "wks";"error";"stk";@ and when I use the validation it
says there's an error, must be because the number ends up
as 5wks. Can it be done this way? I didn't think the
format would interfere or I would have stated it before.

Thank you again for the help
Joe
 
Back
Top