Solved

Who do I identify cells that contain special characters in an excel worksheet

Posted on 2015-01-20
5
325 Views
Last Modified: 2015-01-20
I queried a database and need to identify records that contain special characters (anything other than alpha or numeric.)  I would like an X to be inserted in column A if any cell on that row contains a special character. I would also like the cell that contains the special character to be marked in some way (highlighted) or test is bold red, etc.
I have uploaded the file.  What would work best for this situation?
0
Comment
Question by:klitton7
  • 3
  • 2
5 Comments
 

Author Comment

by:klitton7
ID: 40559859
0
 
LVL 26

Expert Comment

by:ProfessorJimJam
ID: 40559881
assuming your data do not have spaces.

you can use this formula in the condtional formatting.

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


see attached file
Book1.xlsx
0
 

Author Comment

by:klitton7
ID: 40559906
My data does have spaces..  see attached.
H--Documents-ODBC-PR-Check-Employee-Addr
0
 
LVL 26

Accepted Solution

by:
ProfessorJimJam earned 500 total points
ID: 40560085
see the attached macro enabled file.
EE.xls
0
 

Author Closing Comment

by:klitton7
ID: 40560097
Perfect solution!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question