Solved

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

705 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now