Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Sokkorn
Honored Contributor

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
Contributor III

Spell Number

Depending upon where your data is coming from?

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

flipside
Valued Contributor II

Spell Number

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
Contributor

Re: Spell Number

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

vikasmahajan
Honored Contributor III

Re: Spell Number

Good Work  Rashid !!!

Thanks for Sharing

Vikas

Community Browser