?
Solved

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

Posted on 2015-01-20
5
Medium Priority
?
888 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 27

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 27

Accepted Solution

by:
ProfessorJimJam earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

850 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