📋 Convert Numbers to Words using Indian Numbering in Google Sheets

1. Overview

\[ \begin{array}{l} \textbf{Google Sheets can convert numeric values into words --} \\ \text{following the Indian numbering system (Crore, Lakh, Thousand, Hundred, etc.).} \\ \textbf{By using Google Apps Script, you can automate this conversion --} \\ \text{to display numbers in a readable financial or legal format.} \end{array} \]

2. Core Steps

\[ \begin{array}{ll} \textbf{Step 1:} & \text{Open your Google Sheet containing numeric values.} \\ \textbf{Step 2:} & \text{Go to Extensions $\rightarrow$ Apps Script to open the editor.} \\ \textbf{Step 3:} & \text{Paste the custom function code for number-to-words conversion.} \\ \textbf{Step 4:} & \text{Save the script and reload the sheet.} \\ \textbf{Step 5:} & \text{Use the new custom function in cells (e.g., =NUM2WORDS\_IND(1234567)).} \end{array} \]

3. Sample Google Apps Script


// Convert numbers to words using Indian numbering system
function NUM2WORDS_IND(number) {
  if (isNaN(number)) return 'Not a number';
  
  var a = ['', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 
           'Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 
           'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen'];
  var b = ['', '', 'Twenty', 'Thirty', 'Forty', 'Fifty', 'Sixty', 'Seventy', 'Eighty', 'Ninety'];
  
  function inWords(num) {
    if ((num = num.toString()).length > 9) return 'Overflow';
    var n = ('000000000' + num).substr(-9).match(/^(\d{2})(\d{2})(\d{2})(\d{1})(\d{2})$/);
    if (!n) return;
    var str = '';
    str += (n[1] != 0) ? (a[Number(n[1])] || b[n[1][0]] + ' ' + a[n[1][1]]) + ' Crore ' : '';
    str += (n[2] != 0) ? (a[Number(n[2])] || b[n[2][0]] + ' ' + a[n[2][1]]) + ' Lakh ' : '';
    str += (n[3] != 0) ? (a[Number(n[3])] || b[n[3][0]] + ' ' + a[n[3][1]]) + ' Thousand ' : '';
    str += (n[4] != 0) ? (a[Number(n[4])] + ' Hundred ') : '';
    str += (n[5] != 0) ? ((str != '') ? 'and ' : '') + (a[Number(n[5])] || b[n[5][0]] + ' ' + a[n[5][1]]) : '';
    return str.trim();
  }
  
  return inWords(number);
}

4. Important Notes

\[ \begin{array}{l} \text{• This script follows the Indian numbering system (Crore, Lakh).} \\ \text{• Only supports numbers up to 99,99,99,999 (just under 100 crore).} \\ \text{• Returns an error message if the input is not a valid number.} \\ \text{• Can be used as a custom function in any Google Sheet cell.} \end{array} \]

5. Conceptual Flow (in LaTeX)

The process can be described as:

\[ \text{Numeric Value} \xrightarrow{\text{Apps Script Conversion}} \text{Number in Words (Indian System)} \]

Where: \[ \text{Number in Words} = \{ \text{Crore}, \text{Lakh}, \text{Thousand}, \text{Hundred}, \text{Units} \} \]