A text value (also called a "text string") is one of Excel's primary content types. Other types of content include numbers, dates, times, and Boolean values.
As data is entered into a worksheet, Excel makes a "best guess" on the type of content it is, and formats the value automatically. By default, text values are aligned on the left, and numeric values (including dates and times) are aligned on the right. This alignment quickly shows which values Excel considers text.
Text values in formulas
In a formula, text values require special treatment, and must be enclosed in double quotes (""). For example, the formula below uses the IF function to test a value in A1:
If A1 is greater than 70, the result is "Pass". If the value in A1 is less or equal to 70, the result is "Fail". Notice both "Pass" and "Fail" are surrounded with double quotes. This tells Excel to treat these values as text. The double quotes will not be visible in the final result.
To test if a value is text, you can use the ISTEXT function. In the formula below, ISTEXT will return TRUE if A1 contains text and FALSE if not:
Programmers refer to text values as "text strings". A special kind of text value an "empty string", which means a text value with no text. Empty strings will appear as empty double quotes (""). You'll see empty strings appear in formulas like this:
Translation: if A1 is empty, return an empty string, otherwise return A1.
Empty strings don't display anything in Excel. The formula above, when A1 is empty, will return a result that looks like an empty cell.
Enter number as text
To enter a number as text directly in a worksheet (i.e. not in a formula), precede the number with a single quote character ('). The resulting value will be text, but it will still look like a number. The single quote will not be visible.
When working with Excel formulas, a common term is "empty string". A text string is a text value like "apple". An empty string is a text value that has no value. Since text in Excel formulas must be enclosed in double quotes, an empty string appears...
In Excel's date system, dates are serial numbers. January 1, 1900 is number 1, January 2, 1900 is number 2, and so on. More recent dates are much larger numbers. For example, January 1, 1999 is 36161, and January 1, 2010 is 40179. Because dates are...
Text to Columns is a feature in Excel that parses the text in one cell/column into many columns using a delimiter than can be adjusted. You can find the Text to Columns button on the Data tab of the ribbon, in the Data Tools group. In the example...