+ Reply to Thread
Results 1 to 4 of 4

Allow user to only enter Text in a cell - no special characters

  1. #1
    Forum Contributor
    Join Date
    07-26-2012
    Location
    USA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    351

    Allow user to only enter Text in a cell - no special characters

    Is there a way to only allow users to enter text in a cell? I've tried =ISTEXT with data validation, I've also tried this formula I found on Youtube: =IF(B10="",TRUE,IF(ISERROR(SUMPRODUCT(SEARCH(MID(B10,ROW(INDIRECT("10:"&LEN(B10))),1),"abcdefghijklmnopqrstuvwxyz. "))),FALSE,TRUE))

    I've also tried suppressing keys on the worksheet change event with VBA, but no luck there either.

    Neither of the above validation formulas prevent special characters. I have a cell where the user needs to enter a person's name. I'm using VBA to create a filename with this cell, so I need to restrict invalid filename characters such as <>!/\?"|*
    Does anyone know how to do this? I'm open to a VBA solution as well.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Allow user to only enter Text in a cell - no special characters

    Take a look here!

    http://www.tvmcalcs.com/blog/comment...ta_validation/
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor
    Join Date
    07-26-2012
    Location
    USA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    351

    Re: Allow user to only enter Text in a cell - no special characters

    Thanks. That'll come in handy. But for now I think I'm going to just put this on my save button to delete special characters from the string when saving

    Please Login or Register  to view this content.
    Last edited by VBA FTW; 12-27-2013 at 11:07 AM.

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Allow user to only enter Text in a cell - no special characters

    You are welcome and thanks for the feedback & rep*.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Force user to enter certain characters
    By NJH88 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-08-2013, 09:33 AM
  2. Replies: 8
    Last Post: 12-17-2012, 05:30 AM
  3. restricting the user to enter more than 10 characters
    By maddi1in in forum Excel General
    Replies: 1
    Last Post: 04-05-2007, 07:12 AM
  4. Replies: 3
    Last Post: 04-14-2005, 12:06 PM
  5. Removing special characters in a text cell
    By Darrell in forum Excel General
    Replies: 0
    Last Post: 03-30-2005, 08:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1