Format names in excel

A related text formatting technique is that Excel enables you to switch all your letters into uppercase letters with just a simple function. Type =upper( and click on cell A2 to select Beyonce’s first name. Then, add another parentheses to the end of the function to close it off, and press Enter.

Contents

  • 1 How do you capitalize all letters in Excel?
  • 2 What are formats in Excel?
  • 3 How do I separate first and last names in Excel?
  • 4 How do you put multiple names in one cell in Excel?
  • 5 How do I separate names in a formula in Excel?
  • 6 How do you capitalize titles?
  • 7 What is the shortcut to capitalize words in Excel?
  • 8 How do I format text in an Excel cell?
  • 9 How do I format numbers as text in Excel?
  • 10 How do you change the font in Excel?
  • 11 How do I separate names in sheets?
  • 12 Is last name before comma?
  • 13 How do I separate numbers and names in Excel?
  • 14 How do I get text to fit in one cell in Excel?
  • 15 How do I edit text in multiple cells in Excel?
  • 16 How do I split a name into two cells?
  • 17 How do I extract a full name from a middle name in Excel?
  • 18 How do I separate names in a comma in Excel?
  • 19 How do I change dashes to spaces in Excel?
  • 20 How do you properly write a title?

How do you capitalize all letters in Excel?

Capitalize all letters in cells with formula

  1. Select a blank cell adjacent to the cell you want to capitalize all letters.
  2. Type formula =UPPER(A1) into the Formula Bar, then press the Enter key.
  3. Drag the Fill Handle down to the range which you need to capitalize all letters.

What are formats in Excel?

We use Format Cells to change the formatting of cell number without changing the number itself. We can use Format cells to change the number, alignment, font style, Border style, Fill options and Protection.

How do I separate first and last names in Excel?

Read the steps

  1. Add an empty column by right-clicking on the top of the column next to the existing column of names, then select Insert.
  2. Click the Data tab.
  3. Click on the top of the column with your contacts’ names to highlight the whole column.
  4. Click Text to Columns.
  5. Select “Delimited” and click Next.

How do you put multiple names in one cell in Excel?

5 steps to better looking data

  1. Click on the cell where you need to enter multiple lines of text.
  2. Type the first line.
  3. Press Alt + Enter to add another line to the cell. Tip.
  4. Type the next line of text you would like in the cell.
  5. Press Enter to finish up.

How do I separate names in a formula in Excel?

Split Names tool – fastest way to separate names in Excel
Select any cell containing a name you want to separate and click the Split Names icon on the Ablebits Data tab > Text group. Select the desired names parts (all of them in our case) at click Split.

How do you capitalize titles?

The rules are fairly standard for title case:

  1. Capitalize the first and the last word.
  2. Capitalize nouns, pronouns, adjectives, verbs (including phrasal verbs such as “play with”), adverbs, and subordinate conjunctions.
  3. Lowercase articles (a, an, the), coordinating conjunctions, and prepositions (regardless of length).

What is the shortcut to capitalize words in Excel?

To use a keyboard shortcut to change between lowercase, UPPERCASE, and Capitalize Each Word, select the text and press SHIFT + F3 until the case you want is applied.

How do I format text in an Excel cell?

Change the format for a part of your text in a cell.

  1. Select the cell which you want to format.
  2. In the formula bar highlight the part of the text that you want to format.
  3. Go to the Home tab in the ribbon.
  4. Press the dialog box launcher in the Font section.
  5. Select any formatting options you want.
  6. Press the OK button.

How do I format numbers as text in Excel?

Issue:

  1. Open the Excel workbook.
  2. Click on the column heading to select entire column.
  3. Click Format > Cells.
  4. Click the Number tab.
  5. Select “Text” from the Category list.
  6. Click OK.

How do you change the font in Excel?

Use the cell styles option to change the font in your Excel file.

  1. Select a cell with content. Here: A cell with the style “Normal” is selected.
  2. Right-click on the style on the Home ribbon. Then, click on “Modify”.
  3. In the style window, click on the “Change” button.
  4. Go to the Font tab and select a new style.
  5. Click on OK.

How do I separate names in sheets?

Using Split Text into Columns Feature

  1. Select the cells that contain the name that you want to split.
  2. Click the Data tab.
  3. Click on ‘Split Text into Columns’ option.
  4. In the Separator box that appears, select Space as the delimiter.

Is last name before comma?

However, in English, when a comma is between two names, it usually indicates “Last name, First Name.” When writing “First name Last name,” there should not be a comma between the two names.

How do I separate numbers and names in Excel?

Split text and numbers

  1. Generic formula. =MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&”0123456789″))
  2. To separate text and numbers, you can use a formula based on the FIND function, the MIN function, and the LEN function with the LEFT or RIGHT function, depending on whether you want to extract the text or the number.
  3. Overview.

How do I get text to fit in one cell in Excel?

Wrap text automatically
On the Home tab, in the Alignment group, click Wrap Text. (On Excel for desktop, you can also select the cell, and then press Alt + H + W.) Notes: Data in the cell wraps to fit the column width, so if you change the column width, data wrapping adjusts automatically.

How do I edit text in multiple cells in Excel?

You can drag an area with your mouse, hold down SHIFT and click in two cells to select all the ones between them, or hold down CTRL and click to add individual cells. Then type in your selected text. Finally, hit CTRL+ENTER (instead of enter) and it’ll be entered into all the selected cells. How simple is that?

How do I split a name into two cells?

Split the content from one cell into two or more cells

  1. Select the cell or cells whose contents you want to split.
  2. On the Data tab, in the Data Tools group, click Text to Columns.
  3. Choose Delimited if it is not already selected, and then click Next.

Select the Cell C2, write the formula =MID(A2,SEARCH(” “,A2,1)+1,SEARCH(” “,A2,SEARCH(” “,A2,1)+1)-SEARCH(” “,A2,1)) it will return the middle name from the cell A2.

How do I separate names in a comma in Excel?

Text to Columns

  1. Highlight the column that contains your list.
  2. Go to Data > Text to Columns.
  3. Choose Delimited. Click Next.
  4. Choose Comma. Click Next.
  5. Choose General or Text, whichever you prefer.
  6. Leave Destination as is, or choose another column. Click Finish.

How do I change dashes to spaces in Excel?

1. Replacing spaces using Find and Replace

  1. Select the range of cells containing text strings that include spaces you want to replace.
  2. Press Ctrl + H to display the Find and Replace dialog box.
  3. In the Find what box, type a space.
  4. In the Replace with box, type an underscore, dash, or other value.
  5. Click Replace All.

How do you properly write a title?

Titles of full works like books or newspapers should be italicized. Titles of short works like poems, articles, short stories, or chapters should be put in quotation marks. Titles of books that form a larger body of work may be put in quotation marks if the name of the book series is italicized.

Содержание

  1. How to control and understand settings in the Format Cells dialog box in Excel
  2. Summary
  3. More Information
  4. Number Tab
  5. Auto Number Formatting
  6. Built-in Number Formats
  7. Custom Number Formats
  8. Available number formats in Excel
  9. Number formats
  10. Need more help?
  11. Names in formulas
  12. Learn more about using names
  13. Define a name for a cell or cell range on a worksheet
  14. Manage names by using the Name Manager dialog box
  15. Need more help?

How to control and understand settings in the Format Cells dialog box in Excel

Summary

Microsoft Excel lets you change many of the ways it displays data in a cell. For example, you can specify the number of digits to the right of a decimal point, or you can add a pattern and border to the cell. You can access and modify the majority of these settings in the Format Cells dialog box (on the Format menu, click Cells).

The «More Information» section of this article provides information about each of the settings available in the Format Cells dialog box and how each of these settings can affect the way your data is presented.

More Information

There are six tabs in the Format Cells dialog box: Number, Alignment, Font, Border, Patterns, and Protection. The following sections describe the settings available in each tab.

Number Tab

Auto Number Formatting

By default, all worksheet cells are formatted with the General number format. With the General format, anything you type into the cell is usually left as-is. For example, if you type 36526 into a cell and then press ENTER, the cell contents are displayed as 36526. This is because the cell remains in the General number format. However, if you first format the cell as a date (for example, d/d/yyyy) and then type the number 36526, the cell displays 1/1/2000.

There are also other situations where Excel leaves the number format as General, but the cell contents are not displayed exactly as they were typed. For example, if you have a narrow column and you type a long string of digits like 123456789, the cell might instead display something like 1.2E+08. If you check the number format in this situation, it remains as General.

Finally, there are scenarios where Excel may automatically change the number format from General to something else, based on the characters that you typed into the cell. This feature saves you from having to manually make the easily recognized number format changes. The following table outlines a few examples where this can occur:

If you type Excel automatically assigns this number format
1.0 General
1.123 General
1.1% 0.00%
1.1E+2 0.00E+00
1 1/2 # ?/?
$1.11 Currency, 2 decimal places
1/1/01 Date
1:10 Time

Generally speaking, Excel applies automatic number formatting whenever you type the following types of data into a cell:

Built-in Number Formats

Excel has a large array of built-in number formats from which you can choose. To use one of these formats, click any one of the categories below General and then select the option that you want for that format. When you select a format from the list, Excel automatically displays an example of the output in the Sample box on the Number tab. For example, if you type 1.23 in the cell and you select Number in the category list, with three decimal places, the number 1.230 is displayed in the cell.

These built-in number formats actually use a predefined combination of the symbols listed below in the «Custom Number Formats» section. However, the underlying custom number format is transparent to you.

The following table lists all of the available built-in number formats:

Number format Notes
Number Options include: the number of decimal places, whether or not the thousands separator is used, and the format to be used for negative numbers.
Currency Options include: the number of decimal places, the symbol used for the currency, and the format to be used for negative numbers. This format is used for general monetary values.
Accounting Options include: the number of decimal places, and the symbol used for the currency. This format lines up the currency symbols and decimal points in a column of data.
Date Select the style of the date from the Type list box.
Time Select the style of the time from the Type list box.
Percentage Multiplies the existing cell value by 100 and displays the result with a percent symbol. If you format the cell first and then type the number, only numbers between 0 and 1 are multiplied by 100. The only option is the number of decimal places.
Fraction Select the style of the fraction from the Type list box. If you do not format the cell as a fraction before typing the value, you may have to type a zero or space before the fractional part. For example, if the cell is formatted as General and you type 1/4 in the cell, Excel treats this as a date. To type it as a fraction, type 0 1/4 in the cell.
Scientific The only option is the number of decimal places.
Text Cells formatted as text will treat anything typed into the cell as text, including numbers.
Special Select one of the following from the Type box: Zip Code, Zip Code + 4, Phone Number, and Social Security Number.

Custom Number Formats

If one of the built-in number formats does not display the data in the format that you require, you can create your own custom number format. You can create these custom number formats by modifying the built-in formats or by combining the formatting symbols into your own combination.

Before you create your own custom number format, you need to be aware of a few simple rules governing the syntax for number formats:

Each format that you create can have up to three sections for numbers and a fourth section for text.

The first section is the format for positive numbers, the second for negative numbers, and the third for zero values.

These sections are separated by semicolons.

If you have only one section, all numbers (positive, negative, and zero) are formatted with that format.

You can prevent any of the number types (positive, negative, zero) from being displayed by not typing symbols in the corresponding section. For example, the following number format prevents any negative or zero values from being displayed:

To set the color for any section in the custom format, type the name of the color in brackets in the section. For example, the following number format formats positive numbers blue and negative numbers red:

Instead of the default positive, negative and zero sections in the format, you can specify custom criteria that must be met for each section. The conditional statements that you specify must be contained within brackets. For example, the following number format formats all numbers greater than 100 as green, all numbers less than or equal to -100 as yellow, and all other numbers as cyan:

Источник

Available number formats in Excel

In Excel, you can format numbers in cells for things like currency, percentages, decimals, dates, phone numbers, or social security numbers.

Select a cell or a cell range.

On the Home tab, select Number from the drop-down.

Or, you can choose one of these options:

Press CTRL + 1 and select Number.

Right-click the cell or cell range, select Format Cells… , and select Number.

Select the small arrow, dialog box launcher, and then select Number.

Select the format you want.

Number formats

To see all available number formats, click the Dialog Box Launcher next to Number on the Home tab in the Number group.

The default number format that Excel applies when you type a number. For the most part, numbers that are formatted with the General format are displayed just the way you type them. However, if the cell is not wide enough to show the entire number, the General format rounds the numbers with decimals. The General number format also uses scientific (exponential) notation for large numbers (12 or more digits).

Used for the general display of numbers. You can specify the number of decimal places that you want to use, whether you want to use a thousands separator, and how you want to display negative numbers.

Used for general monetary values and displays the default currency symbol with numbers. You can specify the number of decimal places that you want to use, whether you want to use a thousands separator, and how you want to display negative numbers.

Also used for monetary values, but it aligns the currency symbols and decimal points of numbers in a column.

Displays date and time serial numbers as date values, according to the type and locale (location) that you specify. Date formats that begin with an asterisk ( *) respond to changes in regional date and time settings that are specified in Control Panel. Formats without an asterisk are not affected by Control Panel settings.

Displays date and time serial numbers as time values, according to the type and locale (location) that you specify. Time formats that begin with an asterisk ( *) respond to changes in regional date and time settings that are specified in Control Panel. Formats without an asterisk are not affected by Control Panel settings.

Multiplies the cell value by 100 and displays the result with a percent ( %) symbol. You can specify the number of decimal places that you want to use.

Displays a number as a fraction, according to the type of fraction that you specify.

Displays a number in exponential notation, replacing part of the number with E+n, where E (which stands for Exponent) multiplies the preceding number by 10 to the nth power. For example, a 2-decimal Scientific format displays 12345678901 as 1.23E+10, which is 1.23 times 10 to the 10th power. You can specify the number of decimal places that you want to use.

Treats the content of a cell as text and displays the content exactly as you type it, even when you type numbers.

Displays a number as a postal code (ZIP Code), phone number, or Social Security number.

Allows you to modify a copy of an existing number format code. Use this format to create a custom number format that is added to the list of number format codes. You can add between 200 and 250 custom number formats, depending on the language version of Excel that is installed on your computer. For more information about custom formats, see Create or delete a custom number format.

You can apply different formats to numbers to change how they appear. The formats only change how the numbers are displayed and don’t affect the values. For example, if you want a number to show as currency, you’d click the cell with the number value > Currency.

Applying a number format only changes how the number is displayed and doesn’t affect cell values that’s used to perform calculations. You can see the actual value in the formula bar.

Here’s a list of available number formats and how you can use them in Excel for the web:

Default number format. If the cell isn’t wide enough to show the entire number, this format rounds the number. For example, 25.76 shows as 26.

Also, if the number is 12 or more digits, General format displays the value with scientific (exponential) notation.

Works very much like the General format but varies how it shows numbers with decimal place separators and negative numbers. Here are some examples of how both formats display numbers:

Shows a monetary symbol with numbers. You can specify the number of decimal places with Increase Decimal or Decrease Decimal.

Also used for monetary values, but aligns the currency symbols and decimal points of numbers in a column.

Shows date in this format:

Shows month, day and year in this format:

Shows number date and time serial numbers as time values.

Multiplies the cell value by 100 and displays the result with a percent ( %) symbol.

Use Increase Decimal or Decrease Decimal to specify the number of decimal places you want.

Shows the number as a fraction. For example, 0.5 displays as ½.

Displays numbers in exponential notation, replacing part of the number with E+ n, where E (Exponent) multiplies the preceding number by 10 to the nth power. For example, a 2-decimal Scientific format displays 12345678901 as 1.23E+10, which is 1.23 times 10 to the 10th power. To specify the number of decimal places you want to use, apply Increase Decimal or Decrease Decimal.

Treats the cell value as text and displays it exactly as you type it, even when you type numbers. Learn more about formatting numbers as text.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

Источник

Names in formulas

A name is a meaningful shorthand that makes it easier to understand the purpose of a cell reference, constant, formula, or table, each of which may be difficult to understand at first glance. The following information shows common examples of names and how they can improve clarity.

Example with no name

Example with a name

Learn more about using names

There are several types of names you can create and use.

Defined name A name representing a cell, range of cells, formula, or constant value. You can create your own defined name, or Excel can create a defined name for you, such as when you set a print area.

Table name A name for an Excel table, which is a collection of data about a particular subject stored in records (rows) and fields (columns). Excel creates a default Excel table name of Table1, Table2, and so on, each time you insert an Excel table. You can change a table’s name to make it more meaningful. For more information about Excel tables, see Using structured references with Excel tables.

All names have a scope, either to a specific worksheet (also called the local worksheet level) or to the entire workbook (also called the global workbook level). The scope of a name is the location within which the name is recognized without qualification. For example:

If you have defined a name, such as Budget_FY08, and its scope is Sheet1, that name, if not qualified, is recognized only in Sheet1, but not in other sheets.

To use a local worksheet name in another worksheet, you can qualify it by preceding it with the worksheet name. For example:

If you have defined a name, such as Sales_Dept_Goals, and its scope is the workbook, that name is recognized for all worksheets in that workbook, but not other workbooks.

A name must always be unique within its scope. Excel prevents you from defining a name that already exists within its scope. However, you can use the same name in different scopes. For example, you can define a name, such as GrossProfit, that is scoped to Sheet1, Sheet2, and Sheet3 in the same workbook. Although each name is the same, each name is unique within its scope. You might do this to ensure that a formula that uses the name, GrossProfit, is always referencing the same cells at the local worksheet level.

You can even define the same name, GrossProfit, for the global workbook level, but again the scope is unique. In this case, however, there can be a name conflict. To resolve this conflict, by default Excel uses the name defined for the worksheet because the local worksheet level takes precedence over the global workbook level. If you want to override the precedence and use the workbook name, you can disambiguate the name by prefixing the workbook name. For example:

You can override the local worksheet level for all worksheets in the workbook. One exception is for the first worksheet, which always uses the local name if there is a name conflict that cannot be overridden.

You define a name by using the:

Defined Names box on the formula bar This is best used for creating a workbook level name for a selected range.

Define name from selection You can conveniently create names from existing row and column labels by using a selection of cells in the worksheet.

New Name dialog box This is best used for when you want more flexibility in creating names, such as specifying a local worksheet level scope or creating a name comment.

Note: By default, names use absolute cell references.

You can enter a name by:

Typing Typing the name, for example, as an argument to a formula.

Using Formula AutoComplete Use the Formula AutoComplete drop-down list, where valid names are automatically listed for you.

Selecting from the Use in Formula command Select a defined name from a list available from the Use in Formula command in the Defined Names group on the Formulas tab.

You can also create a list of defined names in a workbook. Locate an area with two empty columns on the worksheet (the list will contain two columns, one for the name and one for a description of the name). Select a cell that will be the upper-left corner of the list. On the Formulas tab, in the Defined Names group, click Use in Formula, click Paste and then, in the Paste Names dialog box, click Paste List.

The following is a list of syntax rules for creating and editing names.

Valid characters The first character of a name must be a letter, an underscore character (_), or a backslash (). Remaining characters in the name can be letters, numbers, periods, and underscore characters.

Tip: You cannot use the uppercase and lowercase characters «C», «c», «R», or «r» as a defined name, because they are used as shorthand for selecting a row or column for the currently selected cell when you enter them in a Name or Go To text box.

Cell references disallowed Names cannot be the same as a cell reference, such as Z$100 or R1C1.

Spaces are not valid Spaces are not allowed as part of a name. Use the underscore character (_) and period (.) as word separators, such as, Sales_Tax or First.Quarter.

Name length A name can contain up to 255 characters.

Case sensitivity Names can contain uppercase and lowercase letters. Excel does not distinguish between uppercase and lowercase characters in names. For example, if you create the name Sales and then another name called SALES in the same workbook, Excel prompts you to choose a unique name.

Define a name for a cell or cell range on a worksheet

Select the cell, range of cells, or nonadjacent selections that you want to name.

Click the Name box at the left end of the formula bar.

Type the name you want to use to refer to your selection. Names can be up to 255 characters in length.

Note: You cannot name a cell while you are changing the contents of the cell.

You can convert existing row and column labels to names.

Select the range you want to name, including the row or column labels.

On the Formulas tab, in the Defined Names group, click Create from Selection.

In the Create Names from Selection dialog box, designate the location that contains the labels by selecting the Top row, Left column, Bottom row, or Right column check box. A name created by using this procedure refers only to the cells that contain values and excludes the existing row and column labels.

On the Formulas tab, in the Defined Names group, click Define Name.

In the New Name dialog box, in the Name box, type the name you want to use for your reference.

Note: Names can be up to 255 characters in length.

To specify the scope of the name, in the Scope drop-down list box, select Workbook or the name of a worksheet in the workbook.

Optionally, in the Comment box, enter a descriptive comment up to 255 characters.

In the Refers to box, do one of the following:

To enter a cell reference, type the cell reference.

Tip: The current selection is entered by default. To enter other cell references as an argument, click Collapse Dialog (which temporarily shrinks the dialog box), select the cells on the worksheet, and then click Expand Dialog .

To enter a constant, type = (equal sign) and then type the constant value.

To enter a formula, type = and then type the formula.

To finish and return to the worksheet, click OK.

Tip: To make the New Name dialog box wider or longer, click and drag the grip handle at the bottom.

Manage names by using the Name Manager dialog box

Use the Name Manager dialog box to work with all the defined names and table names in a workbook. For example, you may want to find names with errors, confirm the value and reference of a name, view or edit descriptive comments, or determine the scope. You can also sort and filter the list of names, and easily add, change, or delete names from one location.

To open the Name Manager dialog box, on the Formulas tab, in the Defined Names group, click Name Manager.

The Name Manager dialog box displays the following information about each name in a list box:

One of the following:

A defined name, which is indicated by a defined name icon.

A table name, which is indicated by a table name icon.

The current value of the name, such as the results of a formula, a string constant, a cell range, an error, an array of values, or a placeholder if the formula cannot be evaluated. The following are representative examples:

«this is my string constant»

The current reference for the name. The following are representative examples:

A worksheet name, if the scope is the local worksheet level.

«Workbook,» if the scope is the global worksheet level.

Additional information about the name up to 255 characters. The following are representative examples:

This value will expire on May 2, 2007.

Don’t delete! Critical name!

Based on the ISO certification exam numbers.

You cannot use the Name Manager dialog box while you are changing the contents of a cell.

The Name Manager dialog box does not display names defined in Visual Basic for Applications (VBA), or hidden names (the Visible property of the name is set to «False»).

To automatically size the column to fit the longest value in that column, double-click the right side of the column header.

To sort the list of names in ascending or descending order, click the column header.

Use the commands in the Filter drop-down list to quickly display a subset of names. Selecting each command toggles the filter operation on or off, making it easy to combine or remove different filter operations to get the results you want.

To filter the list of names, do one or more of the following:

Names Scoped To Worksheet

Display only those names that are local to a worksheet.

Names Scoped To Workbook

Display only those names that are global to a workbook.

Names With Errors

Display only those names with values containing errors (such as #REF, #VALUE, or #NAME).

Names Without Errors

Display only those names with values that do not contain errors.

Display only names defined by you or by Excel, such as a print area.

Display only table names.

If you change a defined name or table name, all uses of that name in the workbook are also changed.

On the Formulas tab, in the Defined Names group, click Name Manager.

In the Name Manager dialog box, click the name that you want to change, and then click Edit.

Tip: You can also double-click the name.

In the Edit Name dialog box, in the Name box, type the new name for the reference.

In the Refers to box, change the reference, and then click OK.

In the Name Manager dialog box, in the Refers to box, change the cell, formula, or constant represented by the name.

To cancel unwanted or accidental changes, click Cancel , or press ESC.

To save changes, click Commit , or press ENTER.

The Close button only closes the Name Manager dialog box. It is not required for changes that have already been made.

On the Formulas tab, in the Defined Names group, click Name Manager.

In the Name Manager dialog box, click the name that you want to change.

Select one or more names by doing one of the following:

To select a name, click it.

To select more than one name in a contiguous group, click and drag the names, or press SHIFT and click the mouse button for each name in the group.

To select more than one name in a noncontiguous group, press CTRL and click the mouse button for each name in the group.

Click Delete. You can also press DELETE.

Click OK to confirm the deletion.

The Close button only closes the Name Manager dialog box. It is not required for changes that have already been made.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

Источник

Have a spreadsheet full of employee contact information? Demographic data for people in your community? A list of classmates attending that upcoming reunion? Most of our spreadsheets contain peoples’ names at some point in the project lifecycle. Here are a few shortcuts for dealing with text like first and last names.

Finding the First Initial from Someone’s Name

There are all sorts of ways to parse out text. In other words, you can have Excel tell you a person’s first initial or last initial.

In this example, we’ll use the =left() function to find the first initial for Beyonce, Barack Obama, and Pablo Picasso. Type =left( and then click on the cell that contains that person’s first name (e.g., cell A2 which contains Beyonce’s first name). Then, type a comma to move on to the second part of the function. Next, Excel wants to know how many characters (letters or numbers) you’re interested in parsing out. Type a 1 to have Excel give you just the first letter.

Your completed function in cell C2 will read: =left(A2,1)

Then, add a closing parentheses to your function and click on the Enter key on your computer’s keyboard to complete the function. Excel will give you a B because B is the left-most letter of Beyonce’s name.

You’re not limited to just the first letter or number in a cell. You could also type =left(A2,2) into cell D2. Excel will return Be because Be are the first two characters in Beyonce’s name.

Ann K. Emery on parsing out the first character of a word in Excel

Switching All Letters to Lowercase

Sometimes you might need to change all your letters to uppercase or all your letters to lowercase.

First, let’s have Excel automatically turn some of our cells into lowercase letters. Type =lower( and then click on cell A2, which contains Beyonce’s first name. Add a ) to finish the function and then press Enter on your keyboard.

In other words, your full function will say =lower(A2)

Excel will grab the Beyonce text from cell A2 and turn that into beyonce in cell C2.

Ann K. Emery on switching all letters to lowercase in your spreadsheet

Switching All Letters to Uppercase

A related text formatting technique is that Excel enables you to switch all your letters into uppercase letters with just a simple function.

Type =upper( and click on cell A2 to select Beyonce’s first name. Then, add another parentheses to the end of the function to close it off, and press Enter.

Excel will transform Beyonce from A2 into BEYONCE in C2.

Ann K. Emery on switching all letters to uppercase in your spreadsheet

Proper

The =proper() function might be the most useful of all: It transforms your messy text into a proper noun format, meaning that the first letter is capitalized and the other letters are lowercase.

In a perfect world, I would receive spreadsheets that already have this easy-on-the-eyes text formatting. In reality, most of the spreadsheets that I receive from coworkers or download from the internet have a mix of fully lowercase and fully uppercase names.

Simply type =proper( into cell D2. Then click on the poorly-formatted text you want to transform (like cell C2, which contains Beyonce’s name formatted as BEYONCE). Finally, add a ) to complete the function and press Enter on your keyboard.

Your final function will look like this: =proper(C2)

Ann K. Emery on capitalizing proper nouns in Excel

More about Ann K. Emery
Ann K. Emery is a sought-after speaker who is determined to get your data out of spreadsheets and into stakeholders’ hands. Each year, she leads more than 100 workshops, webinars, and keynotes for thousands of people around the globe. Her design consultancy also overhauls graphs, publications, and slideshows with the goal of making technical information easier to understand for non-technical audiences.

This tutorial about cell format types in Excel is an essential part of your learning of Excel and will definitely do a lot of good to you in your future use of this software, as a lot of tasks in Excel sheets are based on cells format, as well as several errors are due to a bad implementation of it.

A good comprehension of the cell format types will build your knowledge on a solid basis to master Excel basics and will considerably save you time and effort when any related issue occurs.

A- Introduction

Excel software formats the cells depending on what type of information they contain.

To update the format of the highlighted cell, go to the “Home” tab of the ribbon and click, in the “Number” group of commands on the “Number Format” drop-down list.

Format of the selected cell in Excel

The drop-down list allows the selection to be changed.

Number format drop-down list in Excel

Cell formatting options in the “Number Format” drop-down list are:

  • General
  • Number
  • Currency
  • Accounting
  • Short Date
  • Long Date
  • Time
  • Percentage
  • Fraction
  • Scientific
  • Text
  • And the “More Number Formats” option.

Clicking the “More Number Formats” option brings up additional options for formatting cells, including the ability to do special and custom formatting options.

These options are discussed in detail in the below sections.

Cell format types in Excel are: General, Number, Currency, Accounting, Date, Time, Percentage, Fraction, Scientific, Text, Special (Zip Code, Zip Code + 4, Phone Number, Social Security Number), and Custom. You can get them from the “Number Format” drop-down list in the “Home” tab, or from the launcher arrow below it.

I will detail each one of them in the following sections:

1- General format

By default, cells are formatted as “General”, which could store any type of information. The General format means that no specific format is applied to the selected cell.

When information is typed into a cell, the cell format may change automatically. For example, if I enter “4/4/19” into a cell and press enter, then highlight the cell to view details about it, the cell format will be listed as “Date” instead of “General”.

Excel automatically formats dates
Excel automatically formats dates

Similarly, we can update a cell’s format before or after entering data to adjust the way the data appears. Changing the format of a cell to “Currency” will make it so information entered is displayed as a dollar amount.

Currency format of a cell in Excel
Currency format of a cell in Excel

Typing a number into this cell and pressing enter will not just show that number, but will instead format it accordingly.

Before pressing enter, Excel shows the value which was typed: “4”.

Entering data in already formatted cell in Excel
Entering data in an already formatted cell in Excel

After pressing enter, the value is updated based on the formatting type selected.

Data formatted as currency in Excel
Data formatted as currency in Excel

Don’t let the format type showed in the illustration at the drop-down list confusing you; it is reflecting the cell below (i.e. E4), since we validated by an Enter.

2- Number format

Cells formatted as numbers behave differently than general formatted cells. By default, when a number is entered, or when a cell is formatted as a number already, the alignment of the information within the cell will be on the right instead of on the left. This makes it easier to read a list of numbers such as the below.

Numbers in Excel aligned by default to the right
Numbers in Excel aligned by default to the right

Note in the above screenshot that since we didn’t choose the “Number” format for our cells, they still have a “General” one. They are numbers for Excel (meaning, we can do calculations on them), but they didn’t have yet the number format and its formatting aspects:

You can set the formatting options for Excel numbers in the “Format Cells” dialog box.

To do that, select the cell or the range of cells you want to set the formatting options for their numbers, and go to the “Home” tab of the ribbon, then in the “Number” group of commands, click on the launcher of the dialog box (the arrow on the right-down side of the group).

Launcher of the "cell format" dialog box in Excel
Launcher of the “Format Cells” dialog box in Excel

Excel opens the “Format Cells” dialog box in its “Number” tab. Click in the “Category” pane on “Number”.

Number formatting in "Format Cells" dialog box - Excel
Number formatting in “Format Cells” dialog box – Excel
  • In this dialog box, you can decide how many decimal places to display by updating options in the “Decimal places” field.

Note that this feature is also available in the “Home” tab of the ribbon where you can go to the “Number” group of commands and click the Increase Decimal Increase decimal command in Excel or Decrease Decimal Decrease decimal command in Excel buttons.

Here is the result of consecutive increasing of decimal places on our example of data (1 decimal; 2 decimals; and 3 decimals):

Increase decimal in Excel
Increase decimal in Excel
  • You can also decide if commas should be shown in the display as a thousand separator, by updating the “Use 1000 Separator (,)” option in the “Format Cells” dialog box.

This feature is also available in the “Home” tab of the ribbon by clicking the “Comma Style” button Comma style button in Excel in the “Number” group of commands.

Note that using the Comma Style button will automatically set the format to Accounting.

Apply the thousand separator on numbers in Excel
Apply the thousand separator on numbers in Excel
  • Another option from the Format Cells dialog box is to decide how negative numbers should display by using the “Negative numbers” field.

There are four options for displaying negative
numbers.

  1. Display
    negative numbers with a negative sign before the number.
  2. Display
    negative numbers in red.
  3. Display
    negative numbers in parentheses.
  4. Display
    negative numbers in red and in parentheses.
Formats of negative numbers in Excel

3- Currency format

Cells formatted as currency have a currency symbol such as a dollar sign $ immediately to the left of the number in the cell, and contain two numbers after the decimal by default.

The alignment of numbers in currency formatted cells will be on the right for readability.

Excel numbers formatted with currency type

Currency formatting options are similar to
number formatting options, apart from the currency symbol display.

  • As with regular number formatting, you can decide, in the “Format Cells” dialog box, how many decimal places to display by updating the field “Decimal places”.
Excel currency format in format cells dialog box

You can also find this feature in the “Home” tab of the ribbon, by going to the “Number” group of commands and clicking the Increase Decimal Increase decimal command in Excel or Decrease Decimal Decrease decimal command in Excel.

Increase and decrease decimals for currency numbers in Excel
  • You can also decide what currency symbol should be shown in the display by updating the “Symbol” field in the “Format Cells” dialog box.
  • As with regular number formatting, you can also decide how negative numbers should display by updating the “Negative numbers” field in the “Format Cells” dialog box.

There are four
options for displaying negative numbers.

  1. Display
    negative numbers with a negative sign before the number.
  2. Display
    negative numbers in red.
  3. Display
    negative numbers in parentheses.
  4. Display
    negative numbers in red and in parentheses.

4- Accounting format

Like with the currency format, cells formatted as accounting have a currency symbol such as a dollar sign $; however, this symbol is to the far left of the cell, while the alignment of numbers in the cell is on the right. Accounting numbers contain two numbers after the decimal by default.

Accounting vs Currency format in Excel

Clicking the “Accounting Number Format” button Accounting number format button in Excel in the “Number” group of commands of the “Home” tab, will quickly format a cell or cells as Accounting.

The down arrow to the right of the Accounting Number Format button allows selection between common symbols used for accounting, including English (dollar sign), English (pound), Euro, Chinese, and French symbols.

Accounting formats in Excel
Accounting formats in Excel

Accounting formatting options in the “Format Cells” dialog box (“Home” tab of the ribbon, in the “Number” group of commands, click on the launcher of the “Number Format” dialog box), are similar to number and currency formatting options.

Accounting format options in Excel
  • You can decide how many decimal places to display by updating its option in the “Format Cells” dialog box.

As mentioned before in this tutorial, this feature is also available directly in the “Home” tab of the ribbon by clicking the Increase Decimal Increase decimal command in Excel or Decrease Decimal Decrease decimal command in Excel buttons in the “Number” group of commands.

  • You can also decide in the “Format Cells” dialog box, what currency symbol should be shown in the display by using the “Symbol” drop-down list.
    This dropdown gives a much broader list of options than the “Accounting Number Format” option in the “Home” tab of the ribbon.

Note that with the Accounting formatting option, negative numbers display in parentheses by default. There are not options to change this.

Negative accounting numbers in Excel

5- Date format

There are options for “Short Date” and “Long Date” in the “Number Format” dropdown list of the “Home” tab.

Date format in Excel

Short date shows the date with slashes separating month, day, and year. The order of the month and day may vary depending on your computer’s location settings.

Long date shows the date with the day of the week, month, day, and year separated by commas.

More options for formatting dates are available in the “Format Cells” dialog box (accessible by clicking in the “Number Format” dropdown list of the “Home” tab and choosing the “More Number Formats” option at the bottom).

Date formatting options in Excel
  • You can choose from a long list of available date formats.
  • You can update the location settings used for formatting the date. This will alter the list of format options in the above list and will adjust the display and potentially the order of the elements (day, month, year) within the date.
    Note the below example when we switch from English (United States) format to English (United Kingdom) format.
play changes with location

6- Time format

Cells formatted as time display the time of
day. The default time display is based on your computer’s location settings.

Time formatting options are available in the “Format Cells” dialog box (accessible by choosing the “More Number Formats” option at the bottom of the “Number Format” dropdown list in the “Home” tab of the ribbon).

Time formatting options in Excel
  • You can choose from a long list of available time formats.
  • You can update the location settings used for formatting the time. This will alter the list of format options in the above list and will adjust the display.

7- Percentage format

Cells formatted as percentage display a percent sign to the right of the number. You can change the format of a cell to a percentage using the “Number Format” dropdown list, or by clicking the “Percent Style” button Percent style button in Excel. Both options are accessible from the “Home” tab of the ribbon, in the “Number” group of commands.

Note that updating a number to a percentage
will expect that the number already contains the decimal. For example:

A cell containing the value 0.08, as a percentage, will show 8%.

A cell containing the value 8, as a percentage, will show 800%.

Percentage formatting options are available in the “Format Cells” dialog box, accessible by clicking on “More Number Formats” of the “Number Format” dropdown list in the “Home” tab of the ribbon.

Percentage formatting options in Excel

8- Fraction format

Cells formatted as a fraction display with a slash
symbol separating the numerator and denominator.

Fraction formatting options are available in the “Format Cells” dialog box, accessible by clicking in the “Home” tab of the ribbon, on “More Number Formats” of the “Number Format” dropdown list.

Fraction formatting options in Excel
  • Note that
    when selecting the format to use for a fraction, Excel will round to the
    nearest fraction where the formatting criteria can be met.

As an example, if the
formatting option selected is “Up to one digit”, entering a fraction with two
digits will cause rounding to occur. For example, with the setting of “Up to
one digit”,

If we enter a value of 7/16, the value displayed will be 4/9, as converting to 9ths was the option with only one digit which required the least amount of rounding.

For another example, if the formatting option selected is “As quarters”, entering a fraction that cannot be expressed in quarters (divisible by four) will also cause rounding to occur.

If we enter a value of 5/8, the value displayed will be 3/4. Excel rounded up to 6/8, or 3/4, which was the closest option divisible by four.

Fraction value display in Excel depends on fraction type chosen
  • Also note
    that for the formatting options with “Up to x digits”, Excel will always round
    down to the lowest exact equivalent fraction when possible.

For example, if we enter a value of 2/4 with one of these formatting options active, the value displayed will be 1/2, as this is the mathematical equivalent. This behavior will not take place for formatting options “As…”, since these specifically determine what the denominator should be.

  • Fractions listed as more than a whole (meaning the numerator is a higher number than the denominator), such as 7/4 will automatically be adjusted into a whole number and a fraction 13/4, where the fraction follows the formatting rules selected.

9- Scientific format

Scientific format, otherwise known as
Exponential Notation, allows very large and small numbers to be accurately
represented within a cell, even when the size of the cell cannot accommodate
the size of the numbers.

The way exponential notation works is to theoretically place a decimal in a spot that would make the number shorter, then describe where to move that decimal to return to the original number.

Examples with large numbers, where the decimal is moved to the left:

Scientific format with decimal moved to the left

For the number 300 to be expressed in
exponential notation, Excel moves the decimal from after the whole number
300.00 to between the 3 and the 00. This is typed out as E+02 since the decimal
was moved two places to the left. The other examples are similar, where the
decimal was moved 6 and 12 places to the left.

Examples with small numbers, where the decimal is moved to the right:

Scientific format with decimal moved to the right

For the number 0.2 to be expressed in
exponential notation, Excel moves the decimal to create a whole number 2. This
is typed out as E-01 since the decimal was moved one place to the right. The
other examples are similar, where the decimal was moved 4 and 10 places to the
right.

Scientific formatting options are listed in the “Format Cells” dialog box, accessible by going to the “Home” tab of the ribbon, and clicking the “More Number Formats” option of the “Number Format” dropdown list.

Scientific format in Excel

The only option available is to alter the
number of decimal places shown in the number prior to the scientific notation.

For example, for the value 11.43 formatted with the scientific format, if we change the Decimal places from 2 to 1, the display will change as follows.

Two decimals: at in Excel with 2 decimal places 

One decimal:  Scientific format in Excel with 1 decimal place  

10- Text format

Cells can be formatted as Text through the
“Number Format” dropdown list, in the “Number” group of commands of the “Home”
tab.

Using the Text format in Excel allows values to be entered as they are, without Excel changing them per the above formatting rules.

In general, when entering a text in a cell, you won’t need to set its type to “Text”, as the default format type “General” is sufficient in most cases.

This may be useful when you want to display numbers with leading zeros, want to have spaces before or after numbers or letters, or when you want to display symbols that Excel normally uses for formulas.

Below are examples of some fields formatted as Text.

Examples of cells formatted as text in Excel

Note that when a number is formatted as Text, Excel will display a symbol showing that there could be a possible error Excel shows error symbol with number formatted as text.

Clicking the cell, then clicking the pop-up icon will show what the error may be and offer suggestions for resolution.

Error of Excel number formatted as text

11- Special format

Special format offers four options in the “Format Cells” dialog box, accessible by going to the “Home” tab of the ribbon, and clicking the launcher arrow in the “Number” group of commands.

Special format in Excel
  • Zip Code

When less than five numbers are entered in Zip
Code format, leading zeros will be added to bring the total to five numbers.

When more than five numbers are entered in Zip Code format, all numbers will be displayed, even though this does not meet the format criteria.

Zip code in Excel
  • Zip Code + 4

Zip Code + 4 format automatically creates a
dash symbol before the last four numbers in the zip code.

When less than nine numbers are entered in Zip
Code + 4 format, leading zeros will be added to bring the total to nine
numbers.

When more than nine numbers are entered in Zip Code + 4 format, extra numbers are displayed prior to the dash symbol .

Zip code + 4 in Excel
  • Phone Number

Phone Number format automatically creates a
dash
before the last four numbers in the phone number. This format also adds
parentheses ( ) around the area code when an area code is entered.

When less than the expected number of digits
are entered in Phone Number format, only the entered digits will be displayed,
starting from the end of the phone number, as shown on the third and fourth
lines, below.

When more than the expected number of digits
are entered in Phone Number format, extra numbers are displayed within the area
code parentheses.

Note that Phone Number format in Excel does not handle the number 1 before an area code. This entry would be treated like any other extra number.

Phone number in Excel
  • Social Security Number

Social Security Number format automatically
creates a dash before the last four numbers in the social security number
and a dash before the last six numbers in the social security number.

When less than nine numbers are entered in
Social Security Number format, leading zeros will be added to bring the total
to nine numbers.

When more than nine numbers are entered in Social Security Number format, extra numbers are displayed prior to the first dash .

Social security number in Excel

12- Custom format

Custom formats can be used or added through the
“Format Cells” dialog box, accessible from the “Number” group of commands in
the “Home” tab of the ribbon by clicking the “Number Format” launcher arrow.

This can be useful if the above formatting options do not work for your needs. Custom number formats can be created or updated by typing into the “Type” field of the “Format Cells” dialog box.

When creating a new custom format, be sure to use an existing custom format that you are okay with changing.

Custom format in Excel

Custom number formats are separated, at
maximum, into four parts separated by semicolons ; .

  • Part 1: How
    to handle positive number values
  • Part 2: How
    to handle negative number values
  • Part 3: How
    to handle zero number values
  • Part 4: How
    to handle text values

Note that if fewer parts are included in the custom format coding, Excel will determine how best to merge the above options: As an example, if two parts are listed, positive and zero values will be grouped.

Note that Excel may update the formatting of some fields to Custom automatically depending on what actions are taken on the field.

C- Common issues caused by wrong cell format types in Excel

1- Common issues due to wrong cell format types in Excel

The most common problems you may encounter with a wrong cell format type in Excel are of 3 types:
– Getting a wrong value.
– Getting an error.
– Formula displayed as-is and not calculated.

Let’s illustrate these 3 cases with some examples:

  • Getting a wrong value

This may occur when you enter a value in an already formatted cell with an inappropriate format type, or when you apply a different format to a cell already containing a value.

The following table details some examples:

Wrong values due to wrong cell format in Excel

Wrong values due to wrong cell format in Excel
  • Getting an error

This occurs when you enter a text preceded with a symbol of a dash, or plus, or equal, as an element of a list.

Error of a text recognized as formula in Excel
Error of a text recognized as a formula in Excel

Excel wrongly interprets the text as a formula and show the error “The formula contains unrecognized text”.

  • Formula displayed as-is and not calculated

In the following example, we tried to calculate the total of prices from cell B2 to B6 using the Excel SUM function, but Excel doesn’t calculate our formula and just displayed it as-is.

Excel formula displayed as is and not calculated

The source of the problem is that the result cell, B7, was previously formatted as text before entering the formula.

2- How to correct wrong cell format type issues in Excel

To correct cell format type issues in Excel, apply the right format in the “Number Format” drop-down list, and sometimes, you’ll also need to re-enter the content of the cell. For cells with formulas displayed as text, choose the “General” format, then double click in the cell and press Enter.

Jeff Golden photo

Jeff Golden is an experienced IT specialist and web publisher that has worked in the IT industry since 2010, with a focus on Office applications.

On this website, Jeff shares his insights and expertise on the different Office applications, especially Word and Excel.

How to Format Text in Excel?

Formatting text in Excel includes color, font name, font size, alignment, font appearance in bold, underline, italic, background color of the font cell, etc.

Table of contents
  • How to Format Text in Excel?
    • #1 Text Name
    • #2 Font Size
    • #3 Text Appearance
    • #4 Text Color
    • #5 Text Alignment
    • #6 Text Orientation
    • #7 Conditional Text Formatting
      • #1 – Highlight Specific Value
      • #2 – Highlight Duplicate Value
      • #3 – Highlight Unique Value
    • Things to Remember
    • Recommended Articles

You can download this Formatting Text Excel Template here – Formatting Text Excel Template

#1 Text Name

We can format the text font from default to any other available fonts in Excel. Likewise, we can insert any text value in any of the cells.

Excel Formatting Text Example 1

Under the “Home” tab, we can see so many formatting options available.

Example 1.1

Formatting has been categorized into six groups: “Clipboard,” “Font,” “Alignment,” “Number,” and “Styles.”

In this, we are formatting the font of cell value A1, “Hello Excel.” For this, under the “Font” category, click on the “Font Name” drop-down list and select the font name as per wish.

Excel Formatting Text Example 1.2.0

We hover over one of the font names above. We can see the quick preview in cell A1. If you are satisfied with the font style, click on the name to fix the font name for the selected cell value.

#2 Font Size

Similarly, we can also format the font size of the text in a cell. Just type the font size in numbers next to the font name option.

Example 1.3.0

Enter the font size in numbers to see the impact.

Excel Formatting Text Example 1.4.0

#3 Text Appearance

We can modify the default view of the text value. For example, we can make the text value look bold, italic, and underlined. Look at font size and name options. We can see all these three options.

Example 1.5.0

As per the format, we can apply formatting to text value.

  • We have applied the “Bold” formatting using the Ctrl + B shortcut excel keyAn Excel shortcut is a technique of performing a manual task in a quicker way.read more.

Example 1.7

Excel Formatting Text Example 1.6

  • To apply “Italic” formatting, use the Ctrl + I shortcut key.

Excel Formatting Text Example 1.8

Example 1.10

  • To apply “Underline” formatting, use the Ctrl + U shortcut key.

Excel Formatting a Text Example 1.11

Example 1.12

  • The below image shows a combination of all the above three options.

Excel Formatting Text Example 1.13

  • If we want to apply a double underline, click on the drop-down list of underline options and choose “Double Underline.”

Example 1.14

#4 Text Color

We can format the default font color (black) of text to any colors available.

Excel Formatting Text Example 1.15

  • Click on the drop-down list of the “Font Color” option and change as per choice.

Example 1.16

#5 Text Alignment

We can format the alignment of the Excel text under the “Alignment” group.

  • We can do a left alignment, right alignment, middle alignment, top alignment, and bottom alignment.

Example 1.17

#6 Text Orientation

The important thing under “Alignment” is the “Orientation” of the text value.

Under “Orientation,” we can rotate text values diagonally or vertically.

Excel Formatting Text Example 1.18

  • Angle Counterclockwise

 Example 1.19

  • Angle Clockwise

Excel Formatting Text Example 1.20

  • Vertical Text

Example 1.20

  • Rotate Text Up

Excel Formatting Text Example 1.22

  • Rotate Text Down

 Example 1.23

  • Under “Format Cell Alignment, we have many options. Click on this option and experiment with some techniques to see the impact.

Excel Formatting Text Example 1.24

#7 Conditional Text Formatting

Let us see how to apply conditional formattingConditional formatting is a technique in Excel that allows us to format cells in a worksheet based on certain conditions. It can be found in the styles section of the Home tab.read more to text in Excel.

We have learned some of the basic text formatting techniques. How about the idea of formatting only a specific set of values from the group? If we want to find only duplicate values or find unique values.

These are possible through the conditional formatting technique.

For example, look at the below list of cities.

Excel Formatting Text Example 2

From this list, let us learn some formatting techniques.

#1 – Highlight Specific Value

If we want to highlight only the specific city name, we can only highlight specific city names. For example, assume we want to highlight the city “Bangalore,” then select the data and go to conditional formatting.

 Example 2.1

Click on the drop-down list in excelA drop-down list in excel is a pre-defined list of inputs that allows users to select an option.read more of “Conditional Formatting” >>> “Highlight cells Rules” >>> “Text that Contains.”

Excel Formatting Text Example 2.2

Now, we will see the below window.

 Example 2.3

Next, we must enter the text value that we need to highlight.

Excel Formatting Text Example 2.4

Now from the drop-down list, we must choose the formatting style.

Example 2.5

Click on “OK.” Consequently, it will highlight only the supplied text value.

Excel Formatting Text Example 2.6

#2 – Highlight Duplicate Value

To highlight duplicate values in excelHighlight Cells Rule, which is available under Conditional Formatting under the Home menu tab, can be used to highlight duplicate values in the selected dataset, whether it is a column or row of a table.read more, follow the below path.

“Conditional Formatting” >>> “Highlight cells Rules” >>> “Duplicate Values.”

Excel Formatting Text Example 2.7

Again from the below window, we must select the formatting style.

 Example 2.8

As a result, it will highlight only the text values that appear more than once.

Excel Formatting Text Example 2.9

#3 – Highlight Unique Value

Like how we have highlighted duplicate values similarly, we can highlight all the unique values, i.e., text value that appears only once. Then, the formatting window chooses the “Unique” value option from the duplicate values.

Example 2.10.0

It will highlight only the unique values.

Excel Formatting Text Example 2.11

Things to Remember

  • We must learn shortcut keys to format text values in Excel quickly.
  • We can use conditional formatting to format some text values based on certain conditions.

Recommended Articles

This article is a guide to formatting text in Excel. We discuss formatting text using text name, font size, appearance, color, etc., with practical examples and downloadable Excel templates. You may learn more about Excel from the following articles: –

  • Conditional Formatting in Dates
  • Conditional Formatting along with Formulas
  • Combine Text From Two Or More Cells

Custom Number Formats in Excel

In Excel, you aren’t limited to using built-in number formats. You can define your own custom number formats to display values as thousands or millions (23K or 95.3M), add leading zeros, display » — » for zero values, make negative values red, add bullets, and much more.

This Article (bookmarks):

  • Watch the Video Overview
  • How to Create a Custom Number Format
  • Number Format Codes
  • Examples
    • Format for Thousands and Millions
    • Display Leading Zeros and Include Commas
    • Display Units Without Converting to Text
    • Special Time Formats
    • Including Special Symbols
    • Displaying Fractions
    • Trailing and Leading Characters to Fill a Cell
    • Chart Axes and Labels
  • Using Color Codes
  • Conditional Operators
  • Custom Location Codes for Dates

Watch the video we created to go along with this article!

How to Create a Custom Number Format

To create a custom number format, it is easiest to begin with a built-in format. Open the Format Cells dialog box by pressing Ctrl+1 (or right-click on a cell and select Format Cells) and select the Number tab (see the image below). Then (1) Choose Custom from the Category list, (2) Select a built-in format similar to what you want, and (3) Edit the format string in the Type field.

Create a Custom Number Format in Excel

Number Format Codes

A number format string uses up to 4 different codes, separated by semicolons, as shown in the image below.

Custom Number Format Syntax

Instead of explaining the syntax in detail at this point, let’s take a look at some examples and learn as we go.

Some of the characters like #, 0, @, etc. have special meanings. Some codes like [Red] can change the font color, and quotes can be used to display text or special characters. The table below summarizes some of these special characters.

Special Characters in Number Formats

Character Description
# A digit placeholder
0 A digit that is to be displayed even if it is zero
, (Comma) Interpreted as a 1000’s marker
@ Represents the value displayed as text
* (Asterisk) Repeats the next character to fill the cell
[ColorCode] See the section below about using color codes
[<=100] Conditional operators (valid only in the Positive and Negative sections)
/ Used for fractions such as # #/12 or as the / character for dates
» « (Quotes) Used to display whatever is contained within the quotes as text, such as 0.00 «feet»
d or dd
ddd
dddd
Day number (0-31 or 00-31)
Abbreviated day of week (Mon, Tue, etc.)
Full day of week (Monday, Tuesday, etc.)
m or mm
mmm
mmmm
mmmmm
Month number (0-12 or 00-12)
Abbreviated month name (Jan, Feb, etc.)
Full month name (January, February, etc.)
First letter of the month (J, F, M, etc.)
y or yy
yyyy
Year (0-99 or 00-99)
Full year (1900-9999)
h or hh
m or mm
s or ss
Hour (0-23 or 00-23)
Minutes (0-59 or 00-59)
Seconds (0-59 or 00-59)

NOTE Some characters are specific to locale/language settings. For example J is used for Year in some countries.

Custom Number Format Examples

The examples below show some of the custom number formats that I’ve found the most useful. This isn’t a comprehensive list of all possible number formats. See support.microsoft.com to search for other articles on this subject.

TIP Using a custom number format only affects the displayed value. A formula that references the cell will use the stored value no matter how it is displayed. This means you can still use a formula to refer to the value even though the number might be displayed as «12 ft.»

To see these examples in action, download the Excel file below.

Download the Example File (CustomNumberFormats.xlsx)

Custom Number Format for Thousands and Millions

Format Code Value Displayed As Description
0,K
0.0,K
0.0, «Thousand»
23543 24K
23.5K
23.5 Thousand
Display values in thousands, using the letter K to indicate thousands. The «K» is just a displayed character — it has no special meaning in the number format string. If you want to display more than one letter, you need to enclose the characters in quotes, like the «Thousand» example.
0,,»M»
0.0,,»M»
0.0,, «Million»
23543000 24M
23.5M
23.5 Million
Display values in millons, using the letter M to indicate millions. Note that in this case, you need two commas.

NOTE These are very useful for chart axes and labels.

Display Leading Zeros and Include Commas

Format Code Value Displayed As Description
000
00000
50.8 051
00051
Display values with leading zeros. This does not convert the value to text — it is only a display format.
#,##0.0 3543.46 3,543.5 Display values using commas to separate thousands, millions, etc. The # sign is used as a placeholder, meaning that if there are no 10’s, 100’s, or 1000’s, don’t display them.

Display Units Without Converting to Text

Format Code Value Displayed As
• Display a number and text in the same cell using the conditions [=1] and [>1]. The value is stored as a number, so you can still do calculations on the number of people.
[=1]# «person»;[>1]# «people»;0 1
5
0
1 person
5 people
0
• Display a number and text in the same cell. The value is stored as a number, so you can still do calculations.
0.0 «ft»
0.0 «kg»
# #/## «in»
2.2
4.5
6.25
2.2 ft
4.5 kg
6 1/4 in
• Display a numeric YYMMDD value in years, months, days.
##»y» ##»m» ##»d» 360712 36y 07m 12d

Special Time Formats

There are quite a few built-in time formats to choose from. The following may be less known.

Format Code Value Displayed As Description
[h]:mm:ss
[h]:mm
[mm]:ss
[ss]
49:03:47 49:03:47
49:03
2943:47
176627
Shows elapsed time in hours, minutes or seconds. Note that time does not round up.
h:mm A/P
h:mm a/p
2:25 PM 2:25 P
2:25 p
Displays time using «a» for AM and «p» for PM. Useful when trying to minimize column widths without making fonts smaller.

Including Special Symbols

Some ascii and unicode characters can be copied and pasted directly into the format code. This can be handy for displaying the degrees symbol for temperatures as well as other tricks like showing up and down arrows or bulleted lists.

Format Code Value Displayed As Description
#.#»°» 98.7 98.7° Display temperature in degrees with the ° symbol.
[Color10]▲0;[Red]▼-0 5
-5
▲5
▼-5
Display special symbols for positive and negative, combined with colors.
;;;»•» @ Eggs
Bacon
• Eggs
• Bacon
Create a bulleted list using a special symbol for the bullet. When you enter text, the bullet will be displayed. Numbers and zero values will not be displayed.

Displaying Fractions

Format Code Value Displayed As Description
# ??/12 5.75
12.5
5 9/12
12 6/12
Display a decimal number of feet as feet and inches (rounded to the nearest inch). Or display a decimal year in terms of years and months.
# ??/100 5.2
5.05
12.81
 5 20/100
 5  5/100
12 81/100
Using ??/100 will help line up values in a column (as opposed to just using ?/100). Note that fractions are automatically rounded.
?/2 5.2 10/2 Displays a simple fraction as numerator/denominator.

Trailing and Leading Characters to Fill a Cell

The asterisk (*) in a format code repeats the following character to fill the width of the cell.

Format Code Value Displayed As Description
— @ *- — ✁ —————- Trailing characters.
*.@ pg 2 ………………pg 2 Leading characters

Custom Number Formats for Chart Axes and Labels

Format Code Value Displayed As Description
0 «AD»;0 «BC» 247
-600
247 AD
600 BC
AD and BC Years. Use negative numbers for BC years and positive numbers for AD years.
mmm{Ctrl+j}yyyy 8/20/18 Aug
2018
Add a Carriage Return within the custom number format (e.g. between dddd and mmm) by pressing Ctrl+j.
[Color10]▲0.0%;[Red]▼-0.0% 15.23%
-23.57%
▲15.2%
▼-23.6%
Display arrows for positive and negative, combined with colors and percentages.

A couple of these examples can be seen in the image below. However, notice that the data labels don’t use color codes, so the percentages are shown only as black text rather than red and green. Too bad. Maybe Microsoft will fix that some day.

Example of Custom Number Formats in Chart Axes and Labels

NOTE Editing a custom number format that contains a carriage return is tricky because you can’t see the second row. This is why I write out the code first using «{Ctrl+j}» or just «{j}» and then delete the «{j}» and press Ctrl+j in its place.

Chart Axis Custom Number Format - Linked to Source

When adding a custom number format using the Format Axis window pane, you may not be able to press Ctrl+j to add a carriage return. In that case, first edit the format of the data source, then click on the Link to Source box as shown in the image to the right. After doing that, you can uncheck the Link to Source box and modify the original data source formatting.

Other Tricks

Format Code Value Displayed As Description
;;; anything Display nothing, regardless of the value.
0.# 2 2. Display a decimal point without a 0 after the decimal (2. instead of 2.0)
???.??? 1.2
12.3
123.456
  1.2  
 12.3  
123.456
Vertically align the decimal point when displaying a column of numbers.

NOTE If you are looking for format codes for phone numbers, social security numbers, or zip codes, look in the Special category within the list of built-in number formats.

Custom Number Format Color Codes

By using color format codes such as [Red] or [Blue] or [Color10], you have a limited ability to alter the color of the font via custom number formats. The most common use I’ve seen is to color negative values red. However, one of the examples above also shows how you might want to use a green arrow.

Even though a new color palette was introduced in Excel 2007, the color codes for custom number formats are still based on the old color palette for the Excel 97-2003 format. I created the graphic below to provide a quick reference.

Custom Number Format Color Codes

I made the above color code reference match the layout of the old color palette because there is not a consistent pattern to the numbering.

Define Your Own Color: You can modify the color palette in newer versions of Excel by going to File > Options > Save > Colors. This allows you to change the color associated with the Color1 through Color56 codes. This means that Color10 might not always be a dark green. If you purposely change the color palette (or somebody else does), Color10 might be some other color.

XLS Color Palette For Custom Number Formats

Excel 2016: File > Options > Save > Colors

NOTE The Color1-56 codes in Google Sheets are fixed colors and aren’t changed when you upload an Excel file with a customized color palette.

Conditional Operators

Conditional operators such as [<100] can be used to change the formatting in cases where positive;negative;0 is not how you want the divisions defined.

For example, the following format will display numbers less than 10 red, numbers between 10 and 20 green, other numbers blue, and text will be displayed based on the cell’s font color: [Red][<10]0.00;[Green][<=20]0.00;[Blue]0.00;@

Examples of Conditional Operators in Custom Number Formats

You are limited to 2 numeric conditions, which you place in the negative and positive sections of the format code.

Another use of conditional operators is to display phone numbers with and without an area code, depending on how many digits are in the phone number like this: [<=9999999]###-####;(###)###-####. This assumes that the phone numbers are entered as numbers and not text values. Meaning, that if you actually enter 123-1234 into a cell in Excel, it will be interpreted as a text value, not a number. The phone number format will display 1234567 to 123-4567 and it will display 1234567890 to (123)456-7890.

Custom Location Codes for Dates

When displaying month names and weekday names for dates, you can use location codes such as [$-fr-CA] at the beginning of the format code to tell Excel to display the names in other languages. To learn what the code is for a specific language and location, use the Format Cells dialog in Excel, choose one of the built-in Date formats, then choose the Locale (location) from the drop-down list. Then you can return to the Format Cells dialog box and click on the Custom tab to see what location code was added.

Format Code Value Displayed As Language/Location
[$-en-US](ddd) mmm d, yyyy 10/1/2018 (Mon) Oct 1, 2018 English (United States)
[$-fr-CA](ddd) mmm d, yyyy 8/1/2018 (mer.) août 1, 2018 French (Canada)
[$-de-DE](ddd) mmm d, yyyy 10/1/2018 (Mo) Okt 1, 2018 German (Germany)

Other Notes About Custom Number Formats

To delete a custom number format, open the Format Cells dialog box, select the custom format from the list, then click Delete. When you delete a custom number format, all values in your workbook that use that format will revert to the General format.

Custom number formats that you create are saved with the file. If you want to use the custom format in a different file, you can copy/paste the formatting from your other file by copying and pasting the formatted cell or using the Format Painter tool.

References

  • Number Formats for Charts by Jon Peltier, Excel MVP
  • Excel Custom Number Format Guide by Mynda Treacy, Excel MVP

Like this post? Please share to your friends:
  • Format links in word
  • Formatting content in word
  • Format layout in word
  • Formatting codes in word
  • Format labels in word mail merge