Results 1 to 3 of 3

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

  1. #1

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



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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

  2. #2
    Seeker joseph4tw's Avatar
    Join Date
    May 2012
    Location
    South Florida, USA
    Posts
    13
    Articles
    0
    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.

  3. #3
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,294
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    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.)
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •