SPELLNUMBER

Returns the text after converting a number into words.

numberThe number you want to spell out.
unit_plural(Optional) The unit to use for whole numbers.
unit_single(Optional) The unit to use for 'single' whole numbers.
decimal_plural(Optional) The unit to use for decimal numbers.
decimal_single(Optional) The unit to use for 'single' decimal numbers.
display_fraction(Optional) A logical value indicating if the decimal is displayed as a fraction:
False = 0.5 is displayed as 50 (default)
True = 0.5 is displayed as 50/100
include_and(Optional) A logical value indicating if the text contains the 'and' word:
False = and is not included (default)
True = and is included
include_only(Optional) A logical value indicating if the text is appended with the word 'only':
False = only is not included (default)
True = only is included
include_commas(Optional) A logical value indicating if the text contains commas:
False = commas are not included
True = commas are included (default)

Remarks

* At the moment this function only supports the English language.
* If a number contains more than two decimal places this function will spell out the number as if it was rounded to two decimal places.
* The equivalent VBA function is SPELLNUMBER
link - www.allmath.com/TexttoNumberConverter.php

 A
1=JS.SPELLNUMBER(6) = Six
2=JS.SPELLNUMBER(-5) = Five
3=JS.SPELLNUMBER(1, "pounds", "pound") = One pound
4=JS.SPELLNUMBER(2, "pounds", "pound") = Two pounds
5=JS.SPELLNUMBER(2.1, "pounds", "pound", "pence", "penny") = No pounds, No pence
6=JS.SPELLNUMBER(2.01, "pounds", "pound", "pence", "penny") = No pounds, No pence
7=JS.SPELLNUMBER(200) = Two Hundred
8=JS.SPELLNUMBER(200.5) = No and 5/100
9=JS.SPELLNUMBER(2017, "pounds") = Two Thousand and Seventeen pounds
10=JS.SPELLNUMBER(2004, "pounds", "pound") = Two Thousand and Four pounds
11=JS.SPELLNUMBER(1000345) = One Million, Three Hundred and Forty Five
12=JS.SPELLNUMBER(0.124, "Dollars", "Dollar", "Cents", "Cent") = No Dollars, No Cents
13=JS.SPELLNUMBER(0.9, "Dollars", "Dollar", "Cents", "Cent") = No Dollars, No Cents
14=JS.SPELLNUMBER(20.123, "Dollars", "Dollar", "Cents", "Cent") = No Dollars, No Cents
15=JS.SPELLNUMBER(1000000) = One Million
16=JS.SPELLNUMBER(50000000) = Fifty Million
17=JS.SPELLNUMBER(50003600) = Fifty Million and Three Thousand, Six Hundred
18=JS.SPELLNUMBER(1001001100) = One Billion and One Million and One Thousand, One Hundred
19=JS.SPELLNUMBER(1001001110) = One Billion and One Million and One Thousand, One Hundred and Ten
20=JS.SPELLNUMBER(9999999999999, "Dollars", "Dollar", "Cents", "Cent") = Nine Trillion, Nine Hundred and Ninety Nine Billion, Nine Hundred and Ninety Nine Million, Nine Hundred and Ninety Nine Thousand, Nine Hundred and Ninety Nine Dollars

1 - What is the number '6' converted to words.
What is the number '-5' converted to words.
2 - What is the number '6' converted to words with the pound unit attached.
3 - What is the number '1' converted to words.
4 - What is the number '200' converted to words.
5 - What is the number '2017' converted to words.
6 - What is the number '2017' converted to words with the pound until attached.
7 - What is the number '2004' converted to words.
8 - What is the number '1000345' converted to words.
What is '0.124' converted to words.
9 - What is the number '0.9' converted to words.
10 - What is the number '20.123' converted to words.
11 - What is the number '1000000' converted to words.
12 - What is the number '50000000' converted to words.
13 - What is the number '50003600' converted to words.
14 - What is the number '1001001100' converted to words.
15 - What is the number '1001001110' converted to words.
16 - What is the number '9999999999999' converted to words.



© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext