There are situations where currency to words conversion is
necessary. Consider being an HR manager who creates a payroll slip or an
accountant who creates custom report. It's time to change $500.20 into “Five
Hundred Dollars and Twenty Cents”. There are no such built-in methods for this
type of conversion in Excel. With VBA, however, we'll be able to do just that.
We'll use a custom function that I'll write, just like we use
any other function in Excel. A variety of currencies can be converted using
this feature. This will be a straightforward tutorial, and you don't need to be
an expert in VBA to complete it. This is doable by anyone. If you're interested
in learning Excel VBA, you can enroll in our VBA Programming Course and get
started today.
Let's now follow the steps listed below:
Step 1: Select the "developer tab."
Step 2: Go to "visual basics" by clicking on it.
Step 3: Select "insert" from the menu.
Step 4: Select "module".
Step 5: Paste the code (Check this article to get the code)
Step 6: Close the Visual Basic Editor (VBE).
Step 7: Now enter the formula =NumbersToWords() in any
available cell.
Done! In some cases, the formula result must be transformed
into a value, which you can do as well. Please watch the video tutorial to
convert formula result into value. There are six different ways to accomplish
this.
There are a few things to keep in mind. If you're using a
different currency, you can use the "Find and Replace" feature to
swap out "Dollar" for "Rupee" and "Cents" for
"Paisa," for instance.
You must also save the workbook in.xlsm format, which is an excel macro-enabled workbook. Despite the fact that you've saved the workbook in.xlsm format, you'll have to click on the "enable content" button each time you open it to make the macro work. There are ways to get around the built-in macro security. However, you must first have a thorough understanding of macro security in order to do so. Please feel free to ask any questions in the comments section. Please consider becoming a Patron if you're able to. We appreciate you taking the time to stop by.
Comments
Post a Comment