Forcing the cell input to only text

  • I did do a search but came out empty.


    I do know how to force data in a cell to be a number (using data validation).


    How do you restrict the user to input only text. That is alphabets only, but not to allow "-" (a dash or dashes) only.


    What I am trying to do is to make the user to complete a cell before save event. This is done by entering a name of a person using alphabet letters.


    Thanks

  • Re: Forcing the cell input to only text


    Pradeep and Krishna:


    Thanks. It works. It restricts the user not to enter a number only or a dash or dashes. It is pretty close to what I need.
    But, if a name, that the user has to enter in the cell, has a "dash"/'hyphen", then it would not work.


    Is there a way to allow the user use a dash along with alphabets?


    If not, I can live with your formula.


    Your reply is much appreciated.
    Gops

  • Re: Forcing the cell input to only text



    Krishna:


    Works well. Many thanks.


    Once again this site is amazing.
    Gops

  • Re: Forcing the cell input to only text


    Where does this code go to validate on a text field in a userform?


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!