Formerly Best Training
© 2024 STL. All Rights Reserved.
All prices offered for business users and exclude VAT. E&OE
2nd Floor, CA House, 1 Northey Street, Limehouse Basin, London, E14 8BT. United Kingdom
Forum home » Delegate support and help forum » Microsoft Excel Training and help » Function Called SpellNumber
Resolved · Medium Priority · Version 2007
Lina has attended:
Excel Intermediate course
Excel Advanced course
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
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
|
Excel tip:The Easiest Way to See a Sum or Average in Excel 2010Did you know the quickest and most simple way of working out the average or sum of a set of numbers? |
We'll call during UK business hours
Server loaded in 0.07 secs.