In this article, you will learn how to use the TEXT formula in Google Sheets. This function is beneficial when you insert narratives, such as ones about a financial statement or a KPI dashboard, by combining cell references and manual input.
The general syntax is as follows:
Number: This is a value, such as a number, date, or time, whose formatting you want to change
Format: The formatting you want to apply to the “number”. There are two patterns for this argument: "0” and “#” or date and time format. You can't mix them. Also, don’t forget to enclose the inserted format with quotation marks.
Notes
“0” and “#” formatting
0: If you input 0, when a number to be formatted has fewer digits than the number of “0” in the argument, 0 is forcefully shown. For instance, =TEXT(12.34, “000.000”) returns 012.340. On the other hand, if a number to be converted has more digits to the right of the decimal point than the defined formatting, they are rounded at the place equivalent to the number of zeros (to the right of the decimal point). For example, =TEXT(12.34, “0.0”) returns 12.3.
#: This sign works similarly to 0. However, it doesn’t display zeros on either side of the decimal point. For instance, =TEXT(12.34, “###.###”) shows 12.34.
Date and time formatting
In this format, some alphabets are assigned to specific items (e.g., d for date and day of the week, m for month, and y for year). The number of a particular alphabet defines the detailed format. Look at the descriptions below.
Date/Day
d: the day of the month as one or two digits.
dd: the day of the month as two digits.
ddd: the short name of the day of the week.
dddd: the full name of the day of the week.
Month
m: the month of the year as one or two digits or the number of minutes in a time (e.g., 4). This letter represents month unless it is used with other alphabets such as “h” and “s” to show time.
mm: the month of the year as two digits or the number of minutes in a time. If the original month is single digit, then zero is added to the left (e.g., 04). Again, this letter represents month unless it is used with other alphabets such as “h” and “s” to show time.
mmm: the short name of the month of the year (e.g., Apr).
mmmm: the full name of the month of the year (e.g., April).
mmmmm: the first letter in the month of the year (e.g., A).
Year
yy: the year as two digits (e.g., 22).
yyyy: for the year as four digits (e.g., 2022).
Hour
H/HH: the hour on a 24-hour clock (e.g.,14 for 2PM).
h/hh: for the hour on a 12-hour clock (e.g., 2 for 2PM).
Note: The effect of the number of letters is the same as the one for “m/mm”.
Minute
m/mm: for the number of minutes (e.g., 32)
ss: for the seconds in a time.
ss.000: for milliseconds in a time.
AM/PM: showing “AM” or “PM” according to the time of day.
Here is an example of a template that allows you to have the latest financial and thus updated narratives in Google Sheets: Turn Reports Into Simple Narratives Template - Google Sheets & Excel
Check the following articles if you are interested in formatting text in cells.
How to Make Text Bold, Italic, and Strikethrough in Google Sheets
How to Align Text in Google Sheets
How to Wrap Text in Cell in Google Sheets
How to Rotate Text in Google Sheets
How to Change Default Font in Google Sheets
How to Indent Texts in Google Sheets: Explained
How to Capitalize the First Letter in Google Sheets
How to Capitalize All Letters in Google Sheets
How to Make All Letters Lowercase in Google Sheets
Do you want to learn how to combine or split text in Google Sheets?
How to Combine Texts in Google Sheets
CONCAT Function in Google Sheets: Explained
How to Use the CONCATENATE function in Google Sheets
How to Split Texts into Columns in Google Sheets
How to Use SPLIT Function in Google Sheets
CHAR Function in Google Sheets: Explained
Do you want to know where a specify character or word is in a text string?
LEFT Function in Google Sheets: Explained
How to Use RIGHT Function in Google Sheets
SEARCH Function in Google Sheets: Explained
FIND Function in Google Sheets: Explained
Do you need to replace a part of text with another characters or words?
How to Use REPLACE Function in Google Sheets
SUBSTITUTE Function in Google Sheets: Explained
Do you like to show a formulae in a cell?
How to Use FORMULATEXT Function in Google Sheets
This function is useful when you need to count the number of characters in a text string.
LEN Function in Google Sheets: Explained
Why don’t you double-check the spelling of your texts or cleaning up extra spaces before printing or closing Google Sheets?
How to Spell-check in Google Sheets
How to Trim Whitespaces in Google Sheets
You can repeat the same text string with this formula.
REPT Function in Google Sheets: Explained
You can learn about other Google Sheets formulas and tips that are not mentioned here on this page: LiveFlow‘s How to Guides
Are you learning this formula to visualize financial data, build a financial model, or conduct financial analysis? In that case, LiveFlow may help you automate manual workflows and update numbers in real-time. You can access various financial templates on our website, from the simple Income Statement to Multi-Currency Consolidated Financial Statement. You can also customize these templates as you want without breaking the automated data inflow.
To learn more about LiveFlow, book a demo.
Learn how to do this step-by-step in the video below 👇