NumberTextArabic

Adds Arabic unit to a number using proper Arabic grammar
Units can be customized in the call

Function NumberTextArabic(Number As Integer, Optional String_Empty As String = "فارغ", _
Optional String1 = "قيد واحد", Optional String2 = "قيدان", Optional String3_10 = " قيود", _
Optional String11_ = " قيد") As String
NumberTextArabic = ""
If Number = 0 Then
NumberTextArabic = String_Empty
ElseIf Number = 1 Then
NumberTextArabic = String1
ElseIf Number = 2 Then
NumberTextArabic = String2
ElseIf Number > 2 And Number < 11 Then
NumberTextArabic = Number & String3_10
ElseIf Number > 10 Then
NumberTextArabic = Number & String11_
End If
End Function

Number, Optional String_Empty, Optional String1, Optional String2, Optional String3_10, Optional String11_

Views 2516 Downloads 822


ANmarAmdeen
592
Attachments
Texts + Strings VBA
Revisions

v6.0