Link to home
Start Free TrialLog in
Avatar of anctech
anctech

asked on

Want to validate cells to only have a letter X or a number between 1 and 25

Want to validate cells C6 through V300 so only the letter X (capital or lowercase) or a number between 1 and  25 can be entered in the cell.  Trying to figure out a custom formula for this.  Thank you.
ASKER CERTIFIED SOLUTION
Avatar of barry houdini
barry houdini
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of anctech
anctech

ASKER

Very fast response.  Thank you.
Thanks

Note that the suggested formula will also allow decimals like 6.34 (because that's between 1 and 25) . If you only want integers change to

=IF(C6="X",TRUE,AND(C6>=1,C6<=25,C6-INT(C6)=0))

regards, barry
Avatar of anctech

ASKER

Just want whole numbers to be entered so would your second formula be better for that.
Yes, second version will allow integers only

regards, barry