// text
range.setNumberFormat("@");
// date format
range.setNumberFormat("M/d/yy");
// Money format
range.setNumberFormat("$#,##0.00;$(#,##0.00)");
common syntax characters for custom number format:
A digit in the number. An insignificant 0 will appear in the results.
A digit in the number. An insignificant 0 will not appear in the results.
A digit in the number. An insignificant 0 will appear as a space in the results.
Formats numbers as a dollar value.
Formats numbers with a decimal point.
Formats numbers with a thousands separator.
Formats numbers as a fraction.
Formats numbers as a percent
Formats numbers as an exponent.
Adds text to the formula. Insert the desired text within quotations for it to appear.
Displays text entered into a cell.
Repeats the following character to fill in the remaining space in the cell.
Adds a space equal in width to the following character.