ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is the formula used in excel to writ the Numbers in alphabetical Sentence?

user-image
تم إضافة السؤال من قبل Hamed Mraish , Accounting Manager , Al Jomaih beverages Company Pepsi
تاريخ النشر: 2017/02/16
Firas Shahadi
من قبل Firas Shahadi , Human Resources Director , SAUDI UNION

good question.

unfortunately, there is no build-in function in Excel to have this behavior automatically.

you can check on this 

How to convert a numeric value into English words in Excel

 

hope this help.

Regards

Mohamed Nada
من قبل Mohamed Nada , Fresh Food Category Manager - MENA , Delivery Hero - Talabat

There is a spell number macro has to be download, it can do the Job perfectly.

مستخدم محذوف‎
من قبل مستخدم محذوف‎

There was a function for it in older Excel called "SpellNumber" i think, but not sure about it.

In Excel you have to use Macro. 

 

I just tried it in my Excel for Mac and it works. Don't forget to select the cells whose contents you want to convert and then use the macro:

 

Sub NumberToWords() Dim rngSrc As Range Dim lMax As Long Dim lCtr As Long Dim bNCFlag As Boolean Dim sTitle As String, sMsg As String Dim vCVal As Variant Dim lNumber As Long, sWords As String Set rngSrc = ActiveSheet.Range(ActiveWindow.Selection.Address) lMax = rngSrc.Cells.Count bNCFlag = False For lCtr =1 To lMax vCVal = rngSrc.Cells(lCtr).Value sWords = "" If IsNumeric(vCVal) Then If vCVal <> CLng(vCVal) Then bNCFlag = True Else lNumber = CLng(vCVal) Select Case lNumber Case0 sWords = "Zero" Case1 To sWords = SetThousands(lNumber) Case Else bNCFlag = True End Select End If Else bNCFlag = True End If If sWords > "" Then rngSrc.Cells(lCtr) = sWords End If Next lCtr If bNCFlag Then sTitle = "lNumberToWords Macro" sMsg = "Not all cells converted. May not be whole number or may be too large." MsgBox sMsg, vbExclamation, sTitle End If End Sub Private Function SetOnes(ByVal lNumber As Integer) As String Dim OnesArray(9) As String OnesArray(1) = "One" OnesArray(2) = "Two" OnesArray(3) = "Three" OnesArray(4) = "Four" OnesArray(5) = "Five" OnesArray(6) = "Six" OnesArray(7) = "Seven" OnesArray(8) = "Eight" OnesArray(9) = "Nine" SetOnes = OnesArray(lNumber) End Function Private Function SetTens(ByVal lNumber As Integer) As String Dim TensArray(9) As String TensArray(1) = "Ten" TensArray(2) = "Twenty" TensArray(3) = "Thirty" TensArray(4) = "Fourty" TensArray(5) = "Fifty" TensArray(6) = "Sixty" TensArray(7) = "Seventy" TensArray(8) = "Eighty" TensArray(9) = "Ninety" Dim TeensArray(9) As String TeensArray(1) = "Eleven" TeensArray(2) = "Twelve" TeensArray(3) = "Thirteen" TeensArray(4) = "Fourteen" TeensArray(5) = "Fifteen" TeensArray(6) = "Sixteen" TeensArray(7) = "Seventeen" TeensArray(8) = "Eighteen" TeensArray(9) = "Nineteen" Dim iTemp1 As Integer Dim iTemp2 As Integer Dim sTemp As String iTemp1 = Int(lNumber /) iTemp2 = lNumber Mod sTemp = TensArray(iTemp1) If (iTemp1 =1 And iTemp2 >0) Then sTemp = TeensArray(iTemp2) Else If (iTemp1 >1 And iTemp2 >0) Then sTemp = sTemp + " " + SetOnes(iTemp2) End If End If SetTens = sTemp End Function Private Function SetHundreds(ByVal lNumber As Integer) As String Dim iTemp1 As Integer Dim iTemp2 As Integer Dim sTemp As String iTemp1 = Int(lNumber /) iTemp2 = lNumber Mod If iTemp1 >0 Then sTemp = SetOnes(iTemp1) + " Hundred" If iTemp2 >0 Then If sTemp > "" Then sTemp = sTemp + " " If iTemp2 < Then sTemp = sTemp + SetOnes(iTemp2) If iTemp2 >9 Then sTemp = sTemp + SetTens(iTemp2) End If SetHundreds = sTemp End Function Private Function SetThousands(ByVal lNumber As Long) As String Dim iTemp1 As Integer Dim iTemp2 As Integer Dim sTemp As String iTemp1 = Int(lNumber /) iTemp2 = lNumber Mod If iTemp1 >0 Then sTemp = SetHundreds(iTemp1) + " Thousand" If iTemp2 >0 Then If sTemp > "" Then sTemp = sTemp + " " sTemp = sTemp + SetHundreds(iTemp2) End If SetThousands = sTemp End Function

 

Or you can copy it from here as well.. probably better : Click here 

Roxana Hoque
من قبل Roxana Hoque , Researcher , Japan Agency for Marine-Earth Science and Technology (JAMSTEC).

Macro has to be download first and many spell number are there.  Need to practice, so the it can run properly.

 

المزيد من الأسئلة المماثلة