Skip to content

Instantly share code, notes, and snippets.

@DuongAQ
Last active April 16, 2019 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DuongAQ/7b68b6d92f5f195fcb685683a18e33fc to your computer and use it in GitHub Desktop.
Save DuongAQ/7b68b6d92f5f195fcb685683a18e33fc to your computer and use it in GitHub Desktop.
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