0% found this document useful (0 votes)
71 views

NumberToWords PowerQuery-method

The document describes the conversion of large numbers into text in 3 parts: 1) Formatting numbers with commas and up to the hundred trillion place as text to avoid decimal overflow issues. 2) Creating a custom function to convert 3-digit numbers to words to describe figures. 3) Combining the number formatting and word conversion into a custom function that optionally handles the currency and fractional amount. The process allows large numbers to be converted and described accurately as text.

Uploaded by

Salama Shurrab
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

NumberToWords PowerQuery-method

The document describes the conversion of large numbers into text in 3 parts: 1) Formatting numbers with commas and up to the hundred trillion place as text to avoid decimal overflow issues. 2) Creating a custom function to convert 3-digit numbers to words to describe figures. 3) Combining the number formatting and word conversion into a custom function that optionally handles the currency and fractional amount. The process allows large numbers to be converted and described accurately as text.

Uploaded by

Salama Shurrab
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Number NumbFormatToTrillionDigits Column1

12,345,678.00 000 000 012 345 678.00 12,345,678.00


32,800,829.00 000 000 032 800 829.00 32,800,829.00
900,300,700.00 000 000 900 300 700.00 900,300,700.00
5,063,091,701.00 000 005 063 091 701.00 5,063,091,701.00
17,613,611.00 000 000 017 613 611.00 17,613,611.00
104,987,000,543.00 000 104 987 000 543.00 104,987,000,543.00
1,000,880.00 000 000 001 000 880.00 1,000,880.00
790,000,000.00 000 000 790 000 000.00 790,000,000.00
406,000,017.00 000 000 406 000 017.00 406,000,017.00
7,011,101,207,210.89 007 011 101 207 210.89 7,011,101,207,210.89
100,100,100,100.00 000 100 100 100 100.00 100,100,100,100.00
80,077,723,900.00 000 080 077 723 900.00 80,077,723,900.00
19.77 000 000 000 000 019.77 19.77
0.27 000 000 000 000 000.27 0.27
- 000 000 000 000 000.00 -
WORDS
TWELVE MILLION THREE HUNDRED AND FORTY-FIVE THOUSAND SIX HUNDRED AND SEVENTY-EIGHT NAIRA
THIRTY-TWO MILLION EIGHT HUNDRED THOUSAND EIGHT HUNDRED AND TWENTY-NINE NAIRA
NINE HUNDRED MILLION THREE HUNDRED THOUSAND SEVEN HUNDRED NAIRA
FIVE BILLION SIXTY-THREE MILLION NINETY-ONE THOUSAND SEVEN HUNDRED AND ONE NAIRA
SEVENTEEN MILLION SIX HUNDRED AND THIRTEEN THOUSAND SIX HUNDRED AND ELEVEN NAIRA
ONE HUNDRED AND FOUR BILLION NINE HUNDRED AND EIGHTY-SEVEN MILLION FIVE HUNDRED AND FORTY-THREE NAIRA
ONE MILLION EIGHT HUNDRED AND EIGHTY NAIRA
SEVEN HUNDRED AND NINETY MILLION NAIRA
FOUR HUNDRED AND SIX MILLION SEVENTEEN NAIRA
SEVEN TRILLION ELEVEN BILLION ONE HUNDRED AND ONE MILLION TWO HUNDRED AND SEVEN THOUSAND TWO HUNDRED
ONE HUNDRED BILLION ONE HUNDRED MILLION ONE HUNDRED THOUSAND ONE HUNDRED NAIRA
EIGHTY BILLION SEVENTY-SEVEN MILLION SEVEN HUNDRED AND TWENTY-THREE THOUSAND NINE HUNDRED NAIRA
NINETEEN NAIRA SEVENTY-SEVEN KOBO
TWENTY-SEVEN KOBO
ThreeDigits2Words
NINE HUNDRED AND ONE
Column1
12345678
32800829
900300700
5063091701
17613611
104987000543
1000880
790000000
406000017
7.011101E+12
100100100100
80077723900
19.77
0.27
0
WORDS
TWELVE MILLION THREE HUNDRED AND FORTY-FIVE THOUSAND SIX HUNDRED AND SEVENTY-EIGHT US DOLLAR
THIRTY-TWO MILLION EIGHT HUNDRED THOUSAND EIGHT HUNDRED AND TWENTY-NINE US DOLLAR
NINE HUNDRED MILLION THREE HUNDRED THOUSAND SEVEN HUNDRED US DOLLAR
FIVE BILLION SIXTY-THREE MILLION NINETY-ONE THOUSAND SEVEN HUNDRED AND ONE US DOLLAR
SEVENTEEN MILLION SIX HUNDRED AND THIRTEEN THOUSAND SIX HUNDRED AND ELEVEN US DOLLAR
ONE HUNDRED AND FOUR BILLION NINE HUNDRED AND EIGHTY-SEVEN MILLION FIVE HUNDRED AND FORTY-THREE US DOL
ONE MILLION EIGHT HUNDRED AND EIGHTY US DOLLAR
SEVEN HUNDRED AND NINETY MILLION US DOLLAR
FOUR HUNDRED AND SIX MILLION SEVENTEEN US DOLLAR
SEVEN TRILLION ELEVEN BILLION ONE HUNDRED AND ONE MILLION TWO HUNDRED AND SEVEN THOUSAND TWO HUNDRED
ONE HUNDRED BILLION ONE HUNDRED MILLION ONE HUNDRED THOUSAND ONE HUNDRED US DOLLAR
EIGHTY BILLION SEVENTY-SEVEN MILLION SEVEN HUNDRED AND TWENTY-THREE THOUSAND NINE HUNDRED US DOLLAR
NINETEEN US DOLLAR SEVENTY-SEVEN CENTS
TWENTY-SEVEN CENTS
The conversion to Power Query is done by:
Kunle SOPEJU
Many thanks for letting us get creative with Power
Query!
Here's a short explanation of the steps involved:

The conversion falls into three parts.


Part 1 – Formatting the initial Number
Format the numbers into Hundred Trillion digits in MS Excel as Text. (000 000 000 000 000.00 )
This is easily achievable using TEXT() function without the attendant decimal overflow obtainable if it is executed directly
For example, 7,011,101,207,210.89 became 7,011,101,207,210.8896 when converted to text in Power Query. (Note: the
 
Part 2 – Conversion of any three (3) digits number into words
This is probably the kernel of the conversion process.
The heavy – lifting ! This is where the Hundred, Ten and Units are obtained.
This was converted into a custom function and called several times. For example, to obtain figures like:
Two Hundred and Nineteen Thousand
Five Hundred and One Million
Seven Hundred Billion, etc.
 
Part 3 – Combine and Transform
Combine and Transform Parts 1 & 2. Showing how it works on step – by – step basis.
Convert it into a custom function with the optional inputs of the currency (e.g. US DOLLAR) and fraction of the currency (

Read about the original formula


solution here
00 )
ainable if it is executed directly in Power Query.
xt in Power Query. (Note: the decimal overflow)

figures like:

and fraction of the currency (e.g. CENTS)

You might also like