Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Sokkorn
Master
Master

Spell Number

Hi All,

Let say I have number $110.00 then I need to spell it into <One Hundred Ten US Dollars and Zero Cents>.

How can I achive this?

Regards,

Sokkorn

4 Replies
haymarketpaul
Creator III
Creator III

Depending upon where your data is coming from?

The excellent ASAP Utilities addin for Excel has this function built into it.

flipside
Partner - Specialist II
Partner - Specialist II

To do this within QV itself, to get you started, take this script from here ...

http://www.ozgrid.com/VBA/ValueToWords.htm

... and paste it into the module.  You may need to tidy it up a bit to get the module to recognise it (some blank lines need removing) and also some datatype assignments (As String commands).

Set up a test routine like this ...

sub SpellOut

     MsgBox SpellNumber(1523)

end sub

... and test it.  It will throw some errors (it doesn't recognise the function Val for instance) so just delete the word.

flipside

rmuhammad
Creator
Creator

Finally I was able to turn this logic into QV VBA script. Please see attached functional example.

vikasmahajan

Good Work  Rashid !!!

Thanks for Sharing

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.