Lina has attended:
Excel Intermediate course
Excel Advanced course
Function Called SpellNumber
Hello,
I sued the link to http://support.microsoft.com/kb/213360 to set up the function to convert numbers to words in excel 2010.
We have different currencies and the text always has "Dollar" and "Cent" wording when function Spellnumber is used.
Please advice how can I mac an amendment.
I have a number in cell A1 and currency type in cell B1.
Wording is appearing in A2.
Thanks
RE: function Called SpellNumber
Hi Lina
Thanks for getting in touch. Based on this information and the file we looked at together, I've made the following addition to the code:
Dim CurrentCurrency As String
Dim CurrencyMain As String
Dim CurrencyUnits As String
CurrentCurrency = Sheets("FP").Range("D22").Value
Select Case CurrentCurrency
Case Is = "GBP"
CurrencyMain = "Pound"
CurrencyUnits = "Pence"
Case Is = "USD"
CurrencyMain = "Dollar"
CurrencyUnits = "Cent"
Case Is = "EUR"
CurrencyMain = "Euro"
CurrencyUnits = "Cent"
End Select
Hopefully you can see how you would add another currency: copy the three lines beginning "Case Is..." and modify as required. Let me know if this isn't clear.
One little thing about this, the sheet must be recalculated after changing the drop down. You can achieve this just by editing a cell and pressing enter to force Excel to recalculate, or you can press F9.
I will email you a copy of this later this afternoon so you can see it in the code.
Kind regards
Gary Fenn
Microsoft Office Specialist Trainer
Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector