Solved

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

Posted on 2015-01-20
5
299 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 25

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 25

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

778 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