+ Reply to Thread
Results 1 to 5 of 5

Special characters validation

  1. #1
    Registered User
    Join Date
    12-28-2017
    Location
    varna
    MS-Off Ver
    2016
    Posts
    21

    Special characters validation

    Hi again ,

    I am looking now for solution to highlight cells with conditional formatting if they consist some special symbol (such as , . / "" : &). On the internet i found this as a possible solution:

    SUMPRODUCT((CODE(MID(BB8,ROW(INDIRECT("1:"&LEN(BB8))),1))<48)*(CODE(MID(BB8,ROW(INDIRECT("1:"&LEN(BB8))),1))<>45))+SUMPRODUCT((CODE(MID(BB8,ROW(INDIRECT("1:"&LEN(BB8))),1))>57)*(CODE(MID(BB8,ROW(INDIRECT("1:"&LEN(BB8))),1))<65))+SUMPRODUCT((CODE(MID(BB8,ROW(INDIRECT("1:"&LEN(BB8))),1))>90)*(CODE(MID(BB8,ROW(INDIRECT("1:"&LEN(BB8))),1))<97)*(CODE(MID(BB8,ROW(INDIRECT("1:"&LEN(BB8))),1))<>95))+SUMPRODUCT((CODE(MID(BB8,ROW(INDIRECT("1:"&LEN(BB8))),1))>122)*1)

    but it counts also the empty space as special character. As i can not understand the formula is there a more simple way to get the desirable result or how to rework the formula to not take into account the empty spaces.

    Thanks in advance

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Special characters validation

    We would need to see some sample data that you are using this on, as well as ALL special characters you will test for.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    12-28-2017
    Location
    varna
    MS-Off Ver
    2016
    Posts
    21

    Re: Special characters validation

    Hi FDibbins,

    This conditional formatting should work in columns (O, P, BB and BC, conditional formatting only present in BB and BC right now). The idea is this file will concatenate data and prepare .csv file for upload. That's why i need to highlight special characters that would potentially break the upload after. Special characters i'd like to remove are , . / "" : & (that i know for sure will break my file), might not be all tho, but nice for a starter.

    Thanks.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Special characters validation

    Perhaps the following will help.
    1) Type the symbols that you want to use in separate cells (XFD1:XFD6 in attached file),
    Note that in order to type the / symbol by itself you will need to change Excel options as described in this article.
    2) Use the following formula as a conditional formatting rule (applied to BB16:BC25):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Attached Files Attached Files
    Last edited by JeteMc; 08-28-2018 at 10:44 PM. Reason: Corrected Error in Formula
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Special characters validation

    @ JeteMc
    Note that in order to type the / symbol by itself you will need to change Excel options as described in this article.
    You can also just go into edit mode and type in the /.
    Dave

+ 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. validation special characters Data
    By max_max in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-10-2017, 07:13 PM
  2. Validation specific characters in a string of characters
    By Joshua27 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-20-2015, 12:13 PM
  3. UTF - 8 Special CHaracters HELP!!
    By joaobmx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2014, 03:54 PM
  4. Macro to replace European characters with non "special" English characters?
    By johanna0507 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2012, 09:13 AM
  5. Disallow Special Characters,Certain Numbers Using Data Validation through VBA
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-21-2011, 03:50 PM
  6. Special Characters Fix?
    By mocp2008 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-23-2011, 09:18 AM
  7. Special characters
    By wag in forum Excel General
    Replies: 1
    Last Post: 09-08-2009, 03:25 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