Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
function called spellnumber

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Function Called SpellNumber

Function Called SpellNumber

ResolvedVersion 2007

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

Excel tip:

Concatenating Results of Formulas

To concatenate the results of formulas simply add the "&" after the formula or function closing bracket.

function1(....)&function2(.....)

see example Creating a range of monthly payments as text.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.