Marking/finding out the cells which are having other than English alpha or numerics..

chaitanya125

New member
Joined
May 26, 2012
Messages
2
Reaction score
0
Points
0
Hi All,

I am newbie to this forum.

Need assistance and/or help from the team on one of my work. In a workbook will be dealing with huge data every day. In one of the columns lets say column K, cells containing data other than English Language (A-Z, a-Z, 0-9, / , . ! # % $ ^ & * ( ) _ + = ~ `| \ } { [ } / ? . > < also space), like mainly urdu letters or foreign language alphabets.

Here I want those cells to be marked/colored automatically if I click on a button placed in the work sheet. Is there any possible help I may get.

Please help me on this.

thanks & regards
Chaitanya
 
Hello,

Are you sure you need a VBA solution for this? It's possible to do this with conditional formatting and it would probably be way faster than VBA.

You can check the unicode of each character in the string. If you're not familiar with unicode, look up a unicode character map.

If you look at the map, "normal" characters are from 0 to about 127. So if we can check each character to see if it falls outside of that range, then we'll flag it with red highlighting.

Let's say your text is in column B. We need to add a column with an array formula to pick up which cells have the condition we're looking for.

I'm modifying a formula I found on another website. It's pretty complicated, but basically it looks at every character, one-by-one, and check to see if it is within range of "normal" characters.

Put this formula in column A:
=SUM(IF(CODE(MID(B1,(ROW(OFFSET($B$1,,,LEN(B1)))),1))>127,1,0))

Be sure to enter the formula by pressing CTRL+SHIFT+ENTER to make it an array formula.

Then you can make a conditional format on column B based on the results of column A. Select Column B and open up the conditional formatting manager. Choose to enter a formula and put this formula in there:
=A1>=1


Hope this helps.
 
Could you give us a sample workbook for this? I'd like to see how those characters manifest to know how we could target them.

(Double click "Reply to Thread" to upload a workbook.)
 
Back
Top