The following VBA code also can help you to prevent the special characters while entering the text values.ġ. Then click OK to close this dialog, and now when you enter values which contain the special characters in the specified column you have apply the option, you will get the following warning message. Note: A1 indicates the first cell of your selected range (from left to right).Ĥ. In the Data Validation dialog box, click Settings tab, and choose Custom from the Allow drop down list, then enter this formula =ISNUMBER(SUMPRODUCT(SEARCH(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1),"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"))) into the Formula text box, see screenshot: Then click Data > Data Validation > Data Validation, see screenshot:ģ. Select a range that you want to prevent the special characters entering.Ģ. Prevent special characters entering with Kutools for ExcelĮxcel’ Data Validation can help to allow you only to enter the alphanumeric values. Prevent special characters entering with VBA code Prevent special characters entering with Data Validation Are there any functions in Excel to prevent the special characters entering when we insert values? How to prevent special characters entering in Excel?įor some cases, we just want to enter letters or numbers in cells, and prevent typing the special characters, such as and so on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |