Function TongTheoCatTien(chuoi) As Integer
Dim res As Integer, cd As Integer, i As Integer
cd = Len(chuoi)
For i = 1 To cd
If IsNumeric(Mid(chuoi, i, 1)) Then res = res + CInt(Mid(chuoi, i, 1))
Next
res = CInt(Right(Trim(Str(res)), 1))
TongTheoCatTien = res
End Sub