• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Need Help With A Formula To Identify Cells With Special Characters

tomhouy

New Member
I have a large list of keyword phrases, and I would like to flag any cells that have any special characters in them such as apostrophes, comma's, plus signs, dashes, question marks and such.

I am trying to write a formula that looks up against an array of special characters that I define, but I'm running into problems with characters such as apostrophes or equal signs, which trigger other functionality in Excel when they are the first character in a cell, instead of being stored as is.

Would something like this even be possible using just formulas, and preferably not having to rely on VBA?
 
Hi tomhouy -

Try below...

Assuming your data is in cell A1

Put this in Cell B1

OR(MID(A1,ROW(INDEX(A:A,1):INDEX(A:A,LEN(A1))),1)<"a")

To be acknowledged with CSE

See attached for ref

EDIT:

Result: TRUE indicates that the cell has a special charcter..and FALSE indicates it dosnt have..
 

Attachments

  • Sample_Special Char.xlsm
    9 KB · Views: 5
Last edited:
Hi tomhouy -

Try below...

Assuming your data is in cell A1

Put this in Cell B1

OR(MID(A1,ROW(INDEX(A:A,1):INDEX(A:A,LEN(A1))),1)<"a")

To be acknowledged with CSE

See attached for ref

EDIT:

Result: TRUE indicates that the cell has a special charcter..and FALSE indicates it dosnt have..

Thank you! That seems to do the trick. I'm not entirely sure how the formula works though, lol. Just out of curiosity, is the <"a" part somehow qualifying if there's a character in the cell that's not a letter?
 
Attached has an answer for you...
 

Attachments

  • Sample_Special Char_Explained.xlsx
    17 KB · Views: 10
Back
Top