In this tutorial, we’ll guide you through the process of converting numbers to words within an Excel worksheet. While Excel doesn’t offer a default function for displaying numbers as English words, you can achieve this using Visual Basic for Applications (VBA) modules. Let’s dive into the steps to make your data more reader-friendly.
Step 1: Open Your Excel Worksheet
Begin by opening the Excel worksheet where you want to convert numbers to words. In our example, we have an ‘Invoice’ sheet where we’ll display numerical values as words.
Step 2: Find the Required VBA Code
We’ve provided links in the video description to websites where you can find the necessary VBA code for converting numbers to words. Choose the code that matches your currency format, whether it’s for dollars or Indian rupees.
Step 3: Copy the VBA Code
Once you’ve found the appropriate VBA code, copy it to your clipboard. We recommend saving the code in a Notepad file for reference.
Step 4: Insert a VBA Module
In your Excel worksheet, press ‘Alt’ + ‘F11’ to open the VBA editor. Then, click on ‘Insert’ in the menu and choose ‘Module.’ This creates a space for pasting the VBA code.
Step 5: Paste the VBA Code
Maximize the VBA module window and paste the VBA code by right-clicking and selecting ‘Paste.’ This code has been modified to match the currency format (dollars or Indian rupees) you’re working with.
Step 6: Access the Function
With the VBA code in place, you’ll now have access to a new function. To use it, start by typing an equal sign (‘=’) and then begin typing the function name, which differs for dollars and Indian rupees.
- For dollars, use ‘SpellNumber.’
- For Indian rupees, use ‘SpellIndian.’
Step 7: Specify the Value
After typing the function name, open a set of parentheses, and specify which cell value you want to convert into words. For example, you can convert the value of ‘D25’ into words and display it in cell ‘B24.’ Close the parentheses and press ‘Enter.’
Step 8: Verify the Conversion
Once you press ‘Enter,’ you’ll see the numerical value displayed as words, making your data more reader-friendly.
Step 9: Apply the Method to Other Worksheets
If you want to convert numbers to words in other worksheets, repeat the process. Insert a new module and paste the VBA code that matches the currency format you’re working with (dollars or Indian rupees).
Step 10: Customize Display (Optional)
If you wish to customize the display, you can modify the VBA code in the script. For instance, you can remove “no cents” when there are no cents to display. Simply access the module by pressing ‘Alt’ + ‘F11’ and make the necessary changes in the script.
Step 11: Test Your Modification
After making modifications, test the function to ensure it meets your requirements. The conversion should now display as you’ve customized it.
In summary, this tutorial has shown you how to convert numbers to words in Excel using VBA modules tailored for both dollars and Indian rupees. The VBA code has been adapted to match the currency format, making it a versatile solution for your needs.
We hope you found this tutorial helpful and informative. If you did, please show your support by liking, sharing, and commenting on this video. Don’t forget to subscribe to our channel for more upcoming tutorial videos. Thanks for watching, and take care!