Last active
April 16, 2019 07:06
-
-
Save DuongAQ/7b68b6d92f5f195fcb685683a18e33fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ChuyenFontUnicode() | |
Dim FontRange As Range, FontName As String, FontSize As String | |
FontName = "Time New Roman" 'Tuy chon Font Unicode | |
Application.ScreenUpdating = False | |
On Error Resume Next | |
For Each FontRange In ActiveSheet.UsedRange | |
With FontRange | |
If UCase(Left(.Font.Name, 3)) = ".VN" Then | |
.Value = TCVN3toUNICODE(.Text) | |
.Font.Name = FontName | |
ElseIf UCase(Left(.Font.Name, 3)) = "VNI" Then | |
.Value = VniToUni(.Text) | |
.Font.Name = FontName | |
.Font.Size = FontSize | |
End If | |
End With | |
Next | |
Application.ScreenUpdating = True | |
Set FontRange = Nothing | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment