Convert Numbers to Words in Google Sheets

Google Sheets has no built-in function to spell out numbers. You can add one in two minutes: a free add-on, or a short Apps Script custom function that writes rupees in lakh and crore.

Built-in functionNone
Option 1NumberText add-on
Option 2Your own RUPEES function (Apps Script)

Option 1: NumberText add-on

The NumberText add-on by Alexander Ivanov adds two functions: NUMBERTEXT, for words in many languages, and MONEYTEXT, for currencies.

NUMBERTEXT and MONEYTEXT results in Google Sheets
  1. Go to Extensions → Add-ons → Get add-ons.
  2. Search for NumberText, open it and click Install.
  3. Allow the permissions it asks for.
Extensions, Add-ons, Get add-ons in Google Sheets
Searching for NumberText in Google Workspace Marketplace
Formula Result
=NUMBERTEXT(159) one hundred fifty-nine
=PROPER(NUMBERTEXT(B5)) Capitalises each word
=MONEYTEXT(159,"USD") one hundred fifty-nine US dollars
=MONEYTEXT(115,"INR") one hundred fifteen Indian rupees
NUMBERTEXT wrapped in PROPER
MONEYTEXT converting numbers to US dollars

Third-party add-ons can change or disappear. Check the listing and its permissions before installing on a work account.

Option 2: RUPEES custom function (lakh and crore)

NUMBERTEXT writes one hundred thousand, not one lakh. For Indian invoices, add your own function. It runs inside your sheet, with no add-on and no data sent anywhere.

  1. Go to Extensions → Apps Script.
  2. Delete what’s there, paste the code below and click Save.
  3. Back in the sheet, type =RUPEES(B2).
/**
 * Writes an amount in words in Indian format (lakh, crore).
 * @param {number} amount The amount, e.g. 125000.50
 * @return Rupees ... Only
 * @customfunction
 */
function RUPEES(amount) {
  var ones = ['', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten',
    'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen'];
  var tens = ['', '', 'Twenty', 'Thirty', 'Forty', 'Fifty', 'Sixty', 'Seventy', 'Eighty', 'Ninety'];
  function two(n) { return n < 20 ? ones[n] : tens[Math.floor(n / 10)] + (n % 10 ? ' ' + ones[n % 10] : ''); }
  function three(n) {
    var h = Math.floor(n / 100), r = n % 100;
    return (h ? ones[h] + ' Hundred' + (r ? ' ' : '') : '') + (r ? two(r) : '');
  }
  function words(n) {
    var out = [];
    if (n >= 10000000) { out.push(words(Math.floor(n / 10000000)) + ' Crore'); n %= 10000000; }
    if (n >= 100000) { out.push(two(Math.floor(n / 100000)) + ' Lakh'); n %= 100000; }
    if (n >= 1000) { out.push(two(Math.floor(n / 1000)) + ' Thousand'); n %= 1000; }
    if (n > 0) out.push(three(n));
    return out.join(' ');
  }
  var total = Math.round(Number(amount) * 100);
  if (isNaN(total) || total < 0) return 'Invalid amount';
  var r = Math.floor(total / 100), p = total % 100;
  var text = 'Rupees ' + (r ? words(r) : 'Zero');
  if (p) text += ' and ' + two(p) + ' Paise';
  return text + ' Only';
}

Formula Result
=RUPEES(1250) Rupees One Thousand Two Hundred Fifty Only
=RUPEES(125000.5) Rupees One Lakh Twenty Five Thousand and Fifty Paise Only
=RUPEES(25000000) Rupees Two Crore Fifty Lakh Only

The function works only in the spreadsheet you added it to. Make a copy of that sheet to reuse it.

In Excel instead?

See Excel formula to convert numbers to words and the RUPEES function for Excel. For a one-off, use the number to words converter.

Related