

In this tutorial, we used a simple example to demonstrate how you can convert numbers to words in Excel.I am trying to convert a hex string to a decimal string, to input into an Excel spreadsheet, but I am having no luck finding any solutions to the problem. To get all the results, drag down from the first result using the auto-fill handle, and our final result will be similar to the below image. Save > ALT + Q > Empty cell > Formula > Enter Step 4 Then, in the Excel sheet, click on an empty cell, type =RupeeFormat(A2), and press enter to get our first result. Then, using the ALT + Q command, save the sheet as a macro-enabled workbook and exit the vba application. RupeeFormat_GetD = xArr_1(Val(xDStr) - 1)

XRStr = xRStr & RupeeFormat_GetD(Right(xTStr, 1))įunction RupeeFormat_GetD(xDStr As String) XTArr1 = Array("Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen") XRStr = xRStr & RupeeFormat_GetD(Mid(xStrH, 3))įunction RupeeFormat_GetT(xTStr As String) XRStr = xRStr & RupeeFormat_GetT(Mid(xStrH, 2)) XRStr = RupeeFormat_GetD(Mid(xStrH, 1, 1)) & " Hundred " XRStr = RupeeFormat_GetD(Mid(xStrH, 1, 1)) & " Lac " RupeeFormat = xRStr & xRStr_Paisas & " Only"įunction RupeeFormat_GetH(xStrH As String, xLp As Integer) XRStr_Paisas = " and " & xRStr_Paisas & " Paisas" XNumStr = Left(xNumStr, Len(xNumStr) - 2) XStrTemp = RupeeFormat_GetT(Right(xTemp, 2)) XStrTemp = RupeeFormat_GetH(Right(xTemp, 3), xLp) XNumStr = Trim(Left(xNumStr, xDPInt - 1)) XRStr_Paisas = RupeeFormat_GetT(Left(Mid(xNumStr, xDPInt + 1), 2)) XRStr_Paisas = RupeeFormat_GetT(Left(Mid(xNumStr, xDPInt + 1) & "0", 2)) RupeeFormat = "Digit excced Maximum limit" Program Public Function RupeeFormat(SNum As String) Then, as shown in the image below, type the following programme into the text box.

VBA EXCEL CONVERT STRING TO LONG CODE
Right click > view code > insert > module Step 2 Now right-click on the sheet name and select view code to open the VBA application, and click on insert and select module. Step 1Ĭonsider an Excel sheet with a list of numbers, similar to the image below. Let us see a simple process to know how we can convert numbers to words in Indian rupees in Excel. Here we will create a new VBA module, then use the formula to get any one of the results, and use the auto-fill handle to get all the results. Converting Numbers to Words in Indian Rupees in Excel
VBA EXCEL CONVERT STRING TO LONG HOW TO
Read this tutorial to learn how to convert numbers to words in Indian rupees in Excel. Even though the VBA code will be lengthy, we can use this process if there are many values to convert. We can complete this time-consuming process much more quickly by using the VBA application. When we need to convert numbers to words in Indian rupees in Excel, it can be a time‑consuming process if we do it manually as we need to type the large numbers.
