SpellNumber Sri Lankan Rupee Function

SpellNumber Sri Lankan Rupee Function In Excel

SpellNumber Sri Lankan Rupee is an Excel Function manually created with VBA code to change the given number in written words in Sri Lankan Rupees. In simple terms, inserting this function allows you to display the numbers in Sri Lankan Rupee.

There is no inbuilt function in Excel to display the numeric value in words. As many and many users demanded Microsoft has provided the SpellNumber VBA code.

To display a given number in Sri Lankan Rupee, we need to create the SpellNumber Function manually by inserting the code in a VBA script.

In other words, after inserting the SpellNumber Sri Lankan Rupee function in Excel, the “LKR 2,22,150” displays the number as “LKR Two Hundred Twenty-Two Thousand One Hundred and Fifty” or “Two Hundred Twenty-Two Thousand One Hundred and Fifty Sri Lankan Rupee”.

Here, we will discuss the step-by-step process of how to insert the SpellNumber Sri Lankan Rupee Function in Excel using a VBA Script.

Additionally, you can also check our NUMBERTEXT and MONEYTEXT Function in OpenOffice Calc and SpellNumber Indian Rupees Function in Google Sheets.

How To Create SpellNumber Sri Lankan Rupee Function in Excel?

This function will only be available in the workbook you insert and not in every book on your PC. You need to insert it in every workbook you want to use this function by following the above-mentioned steps.

Steps To Insert SpellNumber Sri Lankan Rupee in Excel

1. Open an Excel Workbook.

2. Go to “Ribbon” and click on “Developer Tab”.

SpellNumber Sri Lankan Rupee

3. Click on “Visual Basic” in the “Code” Section.

4. Go to Insert and click on “Module”. A new and blank module sheet will open.

SpellNumber Sri Lankan Rupee

5. Click on “view raw” below the code. A new window will open in the text mode. Copy this code using CNTRL + A and paste it into the VBA module.

 

6. Click on the “Save” button in the module window and the following dialog box will appear. As our file consists of a macro, click “No”.

SpellNumber Sri Lankan Rupee

7. A “Save As” dialog will open as shown below. As our file now consists of a macro select the “Save As Type” to “Excel Macro-Enabled Workbook”.

SpellNumber Sri Lankan Rupee

8. Select desired location and click on “Save”. This will insert SpellNumber Without Currency Function in your file. Close the VBA module window.

Using this SpellNumber Without Currency Function with some parameters we convert a given number to Sri Lankan Rupees in words.

How To Use SpellNumber Sri Lankan Rupees Function?

Sri Lanka uses an international numbering system that is in hundred thousand instead of lakhs and crores. The above code will display the number without currency and after adding a word or two with the concatenate function you can display the given number in Sri Lankan Rupee.

In this newly created workbook, type a number. Now, in the next cell insert the formula given below:

= “LKR” & ” ” & SpellNumber(Cell Reference)

In our sheet, the cell reference is cell “B2” which consists of a number for which we want to convert to words. Hence, our formula will be = “LKR” & ” ” & SpellNumber(B2).

This will display the amount as “LKR One Hundred Twenty-Three Thousand Four Hundred Fifty-Six”.

In case, you want to display it as  “One Hundred Twenty-Three Thousand Four Hundred Fifty-Six Sri Lankan Rupees” then use the code given below:

=SpellNumber(B2) & ” ” & “Sri Lankan Rupees”

SpellNumber Sri Lankan Rupee

Click on the button below to download the sample file that contains the SpellNumber Sri Lankan Rupee function.

Sample File

Every time you will open this workbook or any other macro-enabled workbook, a security warning will appear as shown below:

Security Warning

Select “Enable this content” and click on “OK”. Otherwise, the code will not function.

Security Warning

If you like this article, kindly share it on different social media platforms so that your friends and colleagues can also benefit from the same. Sharing is Caring.

If you have any queries or suggestions please share them in the comment section below. We’ll be more than happy to assist you.

Exit mobile version