Highlight/find non-Latin letters

sevas1994

Active Member
Joined
Jun 24, 2015
Messages
266
Hi all,

Is there any way to get all non-Latin letters highlighted or found using formula/VBA so on?

Thanks in advance
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi

No, there is no way with a formula.

No, there is no native/simple way with vba.

You'll have to use vba and write some code yourself.
Steps:

- make a list of the letters that you consider valid latin letters
- loop through the text in the cells and check each character to see if it's part of that list
- when you find a character that is not part of the list highlight it


Remark: This can only be done for cells with constant text. In case the text in the cell is the result of a formula this is simply not possible.
 
Last edited:
Upvote 0
Many thanks for the answer

Hi

No, there is no way with a formula.

No, there is no native/simple way with vba.

You'll have to use vba and write some code yourself.
Steps:

- make a list of the letters that you consider valid latin letters
- loop through the text in the cells and check each character to see if it's part of that list
- when you find a character that is not part of the list highlight it


Remark: This can only be done for cells with constant text. In case the text in the cell is the result of a formula this is simply not possible.
 
Upvote 0
You're welcome.

Remark:

If you want to write a general macro to do it, you'll need a list with the all the characters.
The Latin characters are used in many languages and they sometimes have diacritics, the list is quite long (more than 500).

I've extracted the characters of the Latin alphabet from the Unicode map and this will save you some (a lot of :) ) time.

I've posted it here in post #14:

http://www.mrexcel.com/forum/excel-questions/348352-convert-symbols-letters.html#14
 
Upvote 0
Wow thanks. ;) Quite a list to analyze

You're welcome.

Remark:

If you want to write a general macro to do it, you'll need a list with the all the characters.
The Latin characters are used in many languages and they sometimes have diacritics, the list is quite long (more than 500).

I've extracted the characters of the Latin alphabet from the Unicode map and this will save you some (a lot of :) ) time.

I've posted it here in post #14:

http://www.mrexcel.com/forum/excel-questions/348352-convert-symbols-letters.html#14
 
Upvote 0
Yes. All of them.

*AB
gsdf sdBEROÉÁERf sf ßsdf$ $ & ért zázáh oloergsdf sdBEROÉÁERf sf ßsdf$ $ & ért zázáh oloer
AFTER MACROBEFORE MACRO

<colgroup><col style="width:30px; "><col style="width:300px;"><col style="width:298px;"></colgroup><tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]

</tbody>


Excel tables to the web >> Excel Jeanie HTML 4

Give this VBA a try:

Code:
Sub NonLatin()
Dim cell As Range
    For Each cell In Range("A1", Cells(Rows.Count, "A").End(xlUp))
        s = cell.Value
            For i = 1 To Len(s)
                If Mid(s, i, 1) Like "[!A-Za-z ]" Then cell.Characters(i, 1).Font.Bold = True
            Next
    Next
End Sub

I have used bold instead of highlight as I do not know how to highlight a character with a VBA.

The data should be in column A.

Note: the difference is not visible on this page, but in A1 the non-English characters are bold in my spreadsheet.
 
Last edited:
Upvote 0
Many thanks :)

*AB
gsdf sdBEROÉÁERf sf ßsdf$ $ & ért zázáh oloergsdf sdBEROÉÁERf sf ßsdf$ $ & ért zázáh oloer
AFTER MACROBEFORE MACRO

<tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]

</tbody>


Excel tables to the web >> Excel Jeanie HTML 4

Give this VBA a try:

Code:
Sub NonLatin()
Dim cell As Range
    For Each cell In Range("A1", Cells(Rows.Count, "A").End(xlUp))
        s = cell.Value
            For i = 1 To Len(s)
                If Mid(s, i, 1) Like "[!A-Za-z ]" Then cell.Characters(i, 1).Font.Bold = True
            Next
    Next
End Sub

I have used bold instead of highlight as I do not know how to highlight a character with a VBA.

The data should be in column A.

Note: the difference is not visible on this page, but in A1 the non-English characters are bold in my spreadsheet.
 
Upvote 0

Forum statistics

Threads
1,223,954
Messages
6,175,600
Members
452,658
Latest member
GStorm

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top