Hơn chục năm trước mình cũng mày mò viết hàm chuyển số thành chữ, dùng cũng tàm tạm. Nay cần dùng đến tìm không ra. search trên Net thấy cái hàm này của Microsoft
support.microsoft.com
Cái này nó chuyển sang Dollar bằng tiếng Anh. Viết thêm phần dịch sang tiếng Việt là ổn.
Sửa đoạn đầu thành
Function SpellNumber(ByVal MyNumber, MyCurrency$)
'Main Function
If Not IsNumeric(MyNumber) Then
SpellNumber = MyNumber
Exit Function
End If
Dim NoMoneys$, OneMoney$, Moneys$, Xu$, Xus$
Select Case MyCurrency
Case "VND"
NoMoneys = "No VND"
OneMoney = "One VND"
Moneys = " VNDs"
Xu = "Cent"
Xus = "Cents"
Case "USD"
NoMoneys = "No Dollars"
OneMoney = "One Dollar"
Moneys = " Dollars"
Xu = "Cent"
Xus = "Cents"
Case "EUR"
NoMoneys = "No Euros"
OneMoney = "One Euro"
Moneys = " Euros"
Xu = "Cent"
Xus = "Cents"
End Select
...
là dùng được cả cho VND và Euro.
Cuối cùng là dịch sang tiếng Việt nữa là xong
Public Function ChangeMoney$(s$, NS$)
If s = vbNullString Then Exit Function
Dim Str$, i&, Index&
Select Case NS
Case "North": Index = 2
Case "South": Index = 3
Case Else: Index = 1
End Select
Str = s
With ShME
For i = 1 To 63
Str = Replace(Str, .Cells(i, 1), .Cells(i, Index), 1, -1, vbTextCompare)
Next
End With
If Str <> vbNullString Then
ChangeMoney$ = UCase(Left(Str, 1)) & Right(Str, Len(Str) - 1)
End If
End Function
P/S: nhớ dùng cái sheet đính kèm (phía trên gọi là ShME)
Convert numbers into words - Microsoft Support
Discover how to convert numbers into English words in an Excel spreadsheet using the SpellNumber sample function.

Sửa đoạn đầu thành
Function SpellNumber(ByVal MyNumber, MyCurrency$)
'Main Function
If Not IsNumeric(MyNumber) Then
SpellNumber = MyNumber
Exit Function
End If
Dim NoMoneys$, OneMoney$, Moneys$, Xu$, Xus$
Select Case MyCurrency
Case "VND"
NoMoneys = "No VND"
OneMoney = "One VND"
Moneys = " VNDs"
Xu = "Cent"
Xus = "Cents"
Case "USD"
NoMoneys = "No Dollars"
OneMoney = "One Dollar"
Moneys = " Dollars"
Xu = "Cent"
Xus = "Cents"
Case "EUR"
NoMoneys = "No Euros"
OneMoney = "One Euro"
Moneys = " Euros"
Xu = "Cent"
Xus = "Cents"
End Select
...
là dùng được cả cho VND và Euro.
Cuối cùng là dịch sang tiếng Việt nữa là xong
Public Function ChangeMoney$(s$, NS$)
If s = vbNullString Then Exit Function
Dim Str$, i&, Index&
Select Case NS
Case "North": Index = 2
Case "South": Index = 3
Case Else: Index = 1
End Select
Str = s
With ShME
For i = 1 To 63
Str = Replace(Str, .Cells(i, 1), .Cells(i, Index), 1, -1, vbTextCompare)
Next
End With
If Str <> vbNullString Then
ChangeMoney$ = UCase(Left(Str, 1)) & Right(Str, Len(Str) - 1)
End If
End Function
P/S: nhớ dùng cái sheet đính kèm (phía trên gọi là ShME)