SpellNumber Saudi Riyals is an Excel function created through VBA Programming to display a given number in words with Saudi Riyals as currency. It converts a numeric value of SAR into English words including Halalas.
The SpellNumber Function provided by Microsoft spells the numeric value to words as the name suggests.
Using the Microsoft SpellNumber Function you can display $ 2,345.50 as “Dollar Two Thousand Three Hundred Forty-Five and Fifty Cents”.
To display SAR 2,345.50 as ” Two Thousand Three Hundred Forty-Five Riyals and Fifty Halalas ” you need to use the SpellNumber Saudi Riyal Function.
We have edited the code of Microsoft and made some changes to derive the required result.
Let us discuss the whole step by step process on how to create this SpellNumber Saudi Riyal Function using the VBA.
How To Create SpellNumber Saudi Riyals Function
1: Open an Excel workbook.
2: Click on Developer Tab.
3: Click on “Visual Basic” under the Code Tab.
4: Click on Insert in the File Menu and click on Module as shown below:
A new blank module sheet will open.
5: Copy the below Code into the Module sheet.
Code for SpellNumber Function for SAR (Saudi Arabian Riyal)
6: Click the “Save” button. The system will display the following message: “The following features cannot be saved in macro-free workbook”.
As your file consists of a macro you need to save the file as a macro-enabled workbook. Click “No” option.
7: Select “Save As”.
8: Choose the desired disk space to save this file. Select the “Save as type” as “Excel macro-enabled workbook”.
SpellNumber Function for SAR (Saudi Arabian Riyal) has been created in your workbook. This function will only be available in this workbook.
You need to follow the same steps and paste the code in another workbook if you want the same function in another workbook.
When you will open any macro-enabled workbook you will get a Security Warning below the Ribbon.
Select “Enable this content” and Click “OK”. If you don’t do this the code will not function.
Let us try using SpellNumber Function for Saudi Riyals which we created here.
Insert different numbers in Column A. In Column B, type the function SpellNumberEDP, enter cell reference and the Currency “SAR” in quote marks.
Using Fill Handle, copy the same formula to Column B. The function will display the numbers as shown below:
We thank our readers for liking, sharing and following us on different social media platforms.
If you have any queries or suggestions please share in the comment section below. I will be more than happy to assist you.