Public Function FUN_IN_Currency(sum As String) As Currency
Dim i As String, F As String
Dim Summa As String
If InStr(1, sum, ",", 3) <> 0 Then
Summa = Left(sum, InStr(1, sum, ",", 3) - 1)
Summa = Summa & "."
Summa = Summa & Mid(sum, InStr(1, sum, ",", 3) + 1)
sum = Summa
End If
If InStr(1, sum, "-", 3) <> 0 Then
Summa = Left(sum, InStr(1, sum, "-", 3) - 1)
Summa = Summa & "."
Summa = Summa & Mid(sum, InStr(1, sum, "-", 3) + 1)
sum = Summa
End If
If InStr(1, sum, ".", 3) = 0 Then
Summa = sum & ".00"
sum = Summa
End If
FUN_IN_Currency = sum
End Function
|