{"id":1316,"date":"2024-06-15T14:31:30","date_gmt":"2024-06-15T14:31:30","guid":{"rendered":"https:\/\/bestwebteacher.com\/?p=1316"},"modified":"2024-07-15T13:26:52","modified_gmt":"2024-07-15T13:26:52","slug":"how-to-convert-number-to-words-in-excel","status":"publish","type":"post","link":"https:\/\/demo.materiamedica.net\/demo6\/how-to-convert-number-to-words-in-excel\/","title":{"rendered":"How to Convert Number to Words in Excel?"},"content":{"rendered":"<p>Learn how to convert number to words in Excel with our step-by-step guide! In this video, we&#8217;ll show you a secret method to transform your numeric data into text effortlessly. This technique is perfect for anyone looking to enhance their Excel skills, whether you&#8217;re a beginner or an advanced user. You&#8217;ll discover a simple formula that can save you time and make your spreadsheets more readable. Don&#8217;t miss out on this game-changing Excel hack! Watch now and master this essential skill.<\/p>\n<p>By the end of this video, you&#8217;ll have a comprehensive understanding of how to convert numbers to words in Excel. We also provide tips and tricks to ensure you get the best results every time. Subscribe to our channel for more amazing Excel tutorials and tips. Hit the bell icon to stay updated with our latest videos. Leave a comment if you have any questions or need further assistance. Let&#8217;s get started!<\/p>\n<div class=\"video-container\"><iframe title=\"How to Convert Number to Words in Excel \u2013 Secret Method Revealed!\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/tgqibKfYxio?feature=oembed&#038;wmode=opaque\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div>\n<pre class=\"lang:tex decode:true \">'Main Function to Convert Number to Words\r\nFunction NumToWords(ByVal MyNumber)\r\nDim Units As String\r\nDim SubUnits As String\r\nDim TempStr As String\r\nDim DecimalPlace As Integer\r\nDim Count As Integer\r\nReDim Place(9) As String\r\nPlace(2) = \" Thousand \"\r\nPlace(3) = \" Million \"\r\nPlace(4) = \" Billion \"\r\nPlace(5) = \" Trillion \"\r\n\r\n' Convert MyNumber to string and trim white space\r\nMyNumber = Trim(Str(MyNumber))\r\n\r\n' Find position of decimal place 0 if none.\r\nDecimalPlace = InStr(MyNumber, \".\")\r\n\r\n' Convert SubUnits and set MyNumber to Units amount.\r\nIf DecimalPlace &gt; 0 Then\r\nSubUnits = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) &amp; \"00\", 2))\r\nMyNumber = Trim(Left(MyNumber, DecimalPlace - 1))\r\nEnd If\r\n\r\nCount = 1\r\nDo While MyNumber &lt;&gt; \"\"\r\nTempStr = GetHundreds(Right(MyNumber, 3))\r\nIf TempStr &lt;&gt; \"\" Then Units = TempStr &amp; Place(Count) &amp; Units\r\nIf Len(MyNumber) &gt; 3 Then\r\nMyNumber = Left(MyNumber, Len(MyNumber) - 3)\r\nElse\r\nMyNumber = \"\"\r\nEnd If\r\nCount = Count + 1\r\nLoop\r\n\r\nNumToWords = Application.Trim(Units &amp; SubUnits)\r\nEnd Function\r\n\r\n' Converts a number from 100-999 into text\r\nFunction GetHundreds(ByVal MyNumber)\r\nDim Result As String\r\nIf Val(MyNumber) = 0 Then Exit Function\r\nMyNumber = Right(\"000\" &amp; MyNumber, 3)\r\n' Convert the hundreds place.\r\nIf Mid(MyNumber, 1, 1) &lt;&gt; \"0\" Then\r\nResult = GetDigit(Mid(MyNumber, 1, 1)) &amp; \" Hundred \"\r\nEnd If\r\n' Convert the tens and ones place.\r\nIf Mid(MyNumber, 2, 1) &lt;&gt; \"0\" Then\r\nResult = Result &amp; GetTens(Mid(MyNumber, 2))\r\nElse\r\nResult = Result &amp; GetDigit(Mid(MyNumber, 3))\r\nEnd If\r\nGetHundreds = Result\r\nEnd Function\r\n\r\n' Converts a number from 10 to 99 into text.\r\nFunction GetTens(TensText)\r\nDim Result As String\r\nResult = \"\" ' Null out the temporary function value.\r\nIf Val(Left(TensText, 1)) = 1 Then ' If value between 10-19...\r\nSelect Case Val(TensText)\r\nCase 10: Result = \"Ten\"\r\nCase 11: Result = \"Eleven\"\r\nCase 12: Result = \"Twelve\"\r\nCase 13: Result = \"Thirteen\"\r\nCase 14: Result = \"Fourteen\"\r\nCase 15: Result = \"Fifteen\"\r\nCase 16: Result = \"Sixteen\"\r\nCase 17: Result = \"Seventeen\"\r\nCase 18: Result = \"Eighteen\"\r\nCase 19: Result = \"Nineteen\"\r\nCase Else\r\nEnd Select\r\nElse ' If value between 20-99...\r\nSelect Case Val(Left(TensText, 1))\r\nCase 2: Result = \"Twenty \"\r\nCase 3: Result = \"Thirty \"\r\nCase 4: Result = \"Forty \"\r\nCase 5: Result = \"Fifty \"\r\nCase 6: Result = \"Sixty \"\r\nCase 7: Result = \"Seventy \"\r\nCase 8: Result = \"Eighty \"\r\nCase 9: Result = \"Ninety \"\r\nCase Else\r\nEnd Select\r\nResult = Result &amp; GetDigit(Right(TensText, 1)) ' Retrieve ones place.\r\nEnd If\r\nGetTens = Result\r\nEnd Function\r\n\r\n' Converts a number from 1 to 9 into text.\r\nFunction GetDigit(Digit)\r\nSelect Case Val(Digit)\r\nCase 1: GetDigit = \"One\"\r\nCase 2: GetDigit = \"Two\"\r\nCase 3: GetDigit = \"Three\"\r\nCase 4: GetDigit = \"Four\"\r\nCase 5: GetDigit = \"Five\"\r\nCase 6: GetDigit = \"Six\"\r\nCase 7: GetDigit = \"Seven\"\r\nCase 8: GetDigit = \"Eight\"\r\nCase 9: GetDigit = \"Nine\"\r\nCase Else: GetDigit = \"\"\r\nEnd Select\r\nEnd Function<\/pre>\n<h3>Step-by-Step Guide<\/h3>\n<ol>\n<li><strong>Open Excel and Enable Developer Tab<\/strong>:\n<ul>\n<li>Go to <code>File<\/code> &gt; <code>Options<\/code>.<\/li>\n<li>In the <code>Excel Options<\/code> window, select <code>Customize Ribbon<\/code>.<\/li>\n<li>Check the <code>Developer<\/code> option on the right pane to enable the Developer tab.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Open the VBA Editor<\/strong>:\n<ul>\n<li>Click on the <code>Developer<\/code> tab.<\/li>\n<li>Select <code>Visual Basic<\/code> to open the VBA editor.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Insert a New Module<\/strong>:\n<ul>\n<li>In the VBA editor, go to <code>Insert<\/code> &gt; <code>Module<\/code>. This will create a new module where you can write your custom function.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Copy and Paste the VBA Code<\/strong>:\n<ul>\n<li>Copy the following VBA code and paste it into the module:<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<pre class=\"theme:github lang:default decode:true \">Function NumberToWords(ByVal MyNumber)\r\n    Dim UnitsArray(0 To 19) As String\r\n    Dim TensArray(0 To 9) As String\r\n    Dim TempStr As String\r\n    Dim DecimalPlace As Integer, Count As Integer\r\n    Dim DecimalPart As String\r\n    \r\n    ' Define arrays for words\r\n    UnitsArray = Array(\"Zero\", \"One\", \"Two\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", _\r\n                       \"Ten\", \"Eleven\", \"Twelve\", \"Thirteen\", \"Fourteen\", \"Fifteen\", \"Sixteen\", \"Seventeen\", \"Eighteen\", \"Nineteen\")\r\n    TensArray = Array(\"\", \"\", \"Twenty\", \"Thirty\", \"Forty\", \"Fifty\", \"Sixty\", \"Seventy\", \"Eighty\", \"Ninety\")\r\n    \r\n    ' Position of decimal place\r\n    DecimalPlace = InStr(MyNumber, \".\")\r\n    If DecimalPlace &gt; 0 Then\r\n        DecimalPart = Mid(MyNumber, DecimalPlace + 1)\r\n        MyNumber = Left(MyNumber, DecimalPlace - 1)\r\n    End If\r\n    \r\n    Count = 1\r\n    Do While MyNumber &lt;&gt; \"\"\r\n        Select Case Count\r\n            Case 1: TempStr = ConvertHundreds(Right(MyNumber, 3))\r\n            Case 2: TempStr = ConvertHundreds(Right(MyNumber, 3)) &amp; \" Thousand \"\r\n            Case 3: TempStr = ConvertHundreds(Right(MyNumber, 3)) &amp; \" Million \"\r\n            Case 4: TempStr = ConvertHundreds(Right(MyNumber, 3)) &amp; \" Billion \"\r\n        End Select\r\n        NumberToWords = TempStr &amp; NumberToWords\r\n        MyNumber = Left(MyNumber, Len(MyNumber) - 3)\r\n        Count = Count + 1\r\n    Loop\r\n    \r\n    NumberToWords = Application.Trim(NumberToWords)\r\n    \r\n    If DecimalPart &lt;&gt; \"\" Then\r\n        NumberToWords = NumberToWords &amp; \" and \" &amp; DecimalPart &amp; \"\/100\"\r\n    End If\r\nEnd Function\r\n\r\nPrivate Function ConvertHundreds(ByVal MyNumber)\r\n    Dim Result As String\r\n    \r\n    If Val(MyNumber) = 0 Then Exit Function\r\n    MyNumber = Right(\"000\" &amp; MyNumber, 3)\r\n    \r\n    ' Convert the hundreds place.\r\n    If Mid(MyNumber, 1, 1) &lt;&gt; \"0\" Then\r\n        Result = UnitsArray(Val(Mid(MyNumber, 1, 1))) &amp; \" Hundred \"\r\n    End If\r\n    \r\n    ' Convert the tens and units place.\r\n    If Mid(MyNumber, 2, 1) = \"1\" Then ' If value between 10-19\r\n        Result = Result &amp; UnitsArray(Val(Mid(MyNumber, 2, 2)))\r\n    Else ' If value between 20-99\r\n        Result = Result &amp; TensArray(Val(Mid(MyNumber, 2, 1)))\r\n        Result = Result &amp; \" \" &amp; UnitsArray(Val(Mid(MyNumber, 3, 1)))\r\n    End If\r\n    \r\n    ConvertHundreds = Application.Trim(Result)\r\nEnd Function\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>5. Close the VBA Editor<\/strong>:<\/p>\n<p>Close the VBA editor by clicking the <code>X<\/code> in the top-right corner or by going to <code>File<\/code> &gt; <code>Close and Return to Microsoft Excel<\/code>.<\/p>\n<p><strong>6. Use the Custom Function in Excel<\/strong>:<\/p>\n<p>Now you can use the <code>NumberToWords<\/code> function in your Excel worksheet.<\/p>\n<p>For example, if you want to convert the number in cell <code>A1<\/code> to words, you can type the following formula in another cell:<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"theme:github lang:default decode:true \">=NumberToWords(A1)<\/pre>\n<div class=\"flex flex-grow flex-col max-w-full AIPRM__conversation__response\">\n<div class=\"min-h-[20px] text-message flex flex-col items-start whitespace-pre-wrap break-words [.text-message+&amp;]:mt-5 juice:w-full juice:items-end overflow-x-auto gap-2\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"ee2d4188-0524-45c1-919b-3eef701fe9c9\">\n<div class=\"flex w-full flex-col gap-1 juice:empty:hidden juice:first:pt-[3px]\">\n<div class=\"markdown prose w-full break-words dark:prose-invert light\">\n<p>This custom function will convert the number in cell <code>A1<\/code> to its corresponding word representation. For example, if <code>A1<\/code> contains <code>123<\/code>, the function will return &#8220;One Hundred Twenty Three&#8221;. If <code>A1<\/code> contains <code>123.45<\/code>, it will return &#8220;One Hundred Twenty-Three and 45\/100&#8221;.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"mt-1 flex gap-3 empty:hidden juice:-ml-3\">\n<div class=\"items-center justify-start rounded-xl p-1 flex\">\n<div class=\"flex items-center\">\n<div class=\"flex\"><\/div>\n<div class=\"flex items-center pb-0.5 juice:pb-0\">\n<div class=\"[&amp;_svg]:h-full [&amp;_svg]:w-full icon-md h-4 w-4\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to convert number to words in Excel with our step-by-step guide! In this video, we&#8217;ll show you a secret method to transform your numeric data into text effortlessly. This technique is perfect&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1477,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-1316","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel"],"_links":{"self":[{"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/posts\/1316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/comments?post=1316"}],"version-history":[{"count":1,"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/posts\/1316\/revisions"}],"predecessor-version":[{"id":2321,"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/posts\/1316\/revisions\/2321"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/media\/1477"}],"wp:attachment":[{"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/media?parent=1316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/categories?post=1316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demo.materiamedica.net\/demo6\/wp-json\/wp\/v2\/tags?post=1316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}