Excel course · Lesson 7 of 34

Formatting cells: fonts, alignment, borders and styles

Make sheets clear and professional: fonts, fills, borders, alignment, wrap text, merge versus Center Across Selection, Format Painter and cell styles.

Beginner 14 min read

Formatting changes how a cell looks, never what it contains. That sounds cosmetic, but good formatting is what lets a reader find the total in two seconds, spot an input cell, and trust the numbers. Bad formatting, especially merged cells, can also break sorting, filtering and formulas. This lesson covers the visual side: fonts, colours, borders, alignment, column widths, the Format Painter and cell styles. Number formats (how values such as 0.24 appear as 24%) have their own lesson, Number formats and custom format codes.

Where formatting lives

Most formatting tools are on the Home tab, in the Font, Alignment, Number and Styles groups. The complete set is in the Format Cells dialog: press Ctrl+1 (Mac: Cmd+1) or right-click a cell and choose Format Cells. The dialog has six tabs: Number, Alignment, Font, Border, Fill and Protection.

A worked example: formatting a staff list

D7fx=SUM(D3:D6)
ABCD
1Staff list — March 2026
2EmployeeDepartmentStart dateSalary
3Laura KimFinance2021-04-1252000
4Omar HaddadSales2023-09-0147500
5Sofia RossiIT2019-01-0761200
6Tom BeckerSales2024-02-1944800
7Total205500

Raw data before formatting. The total in D7 is =SUM(D3:D6).

Result: 205500

  1. Select A1 and choose Home › Font › Font Size 14 and Bold (Ctrl+B, Mac: Cmd+B). This is the title.
  2. Select the header row A2:D2. Apply Bold, then Home › Font › Fill Color and pick a dark blue, and Font Color white.
  3. With A2:D2 still selected, choose Home › Alignment › Center and Wrap Text, so long headings fit on two lines instead of making columns very wide.
  4. Select D3:D7 and choose Home › Number › Comma Style to add thousands separators.
  5. Select A7:D7 (the total row), apply Bold and choose Home › Font › Borders › Top and Double Bottom Border, the accounting convention for a final total.
  6. Select A2:D7 and choose Home › Font › Borders › All Borders if you want a printed grid, or leave borders off for a cleaner screen look.
  7. Select columns A to D by dragging across the column letters, then double-click any boundary between two column letters. Every column resizes to fit its contents (AutoFit).
Tip. Reserve a single, consistent colour for cells where users type inputs (for example light yellow) and never use it for formulas. Financial modellers often go further: blue font for typed inputs, black for formulas, green for links to other sheets.

Fonts and fills

  • Bold Ctrl+B, italic Ctrl+I, underline Ctrl+U (Mac: Cmd+B, Cmd+I, Cmd+U).
  • Increase or decrease font size with Home › Font › Increase Font Size (Ctrl+Shift+> on Windows; Cmd+Shift+> on Mac).
  • Stick to one font for the whole workbook. The default theme font (Aptos in current Microsoft 365, Calibri in older versions) is fine.
  • Use fill colours sparingly: one colour for headers, one for inputs, perhaps a light shade for totals.

Alignment

  • Horizontal: left, center, right. Leave numbers right-aligned so digits line up; centre short codes and headers.
  • Vertical: top, middle, bottom. Middle looks best when rows are taller than the text.
  • Wrap Text: shows long text on several lines inside the cell. Press Alt+Enter (Mac: Option+Return) to force a line break at a specific point.
  • Indent: Home › Alignment › Increase Indent visually nests sub-items under a heading, useful in budgets.
  • Orientation: rotates text, handy for narrow column headers.

Merge & Center versus Center Across Selection

Home › Alignment › Merge & Center combines several cells into one. It looks tidy for a title, but merged cells cause real trouble: you cannot sort a range that contains merged cells of different sizes, copying and pasting into them fails, selecting a column selects extra columns, and macros stumble over them.

There is a cleaner way to centre a title over several columns without merging:

  1. Select the title cell and the cells to its right, for example A1:D1.
  2. Press Ctrl+1 to open Format Cells and go to the Alignment tab.
  3. Under Horizontal, choose Center Across Selection.
  4. Click OK. The title is centred over A to D, but every cell is still a normal, separate cell.
Watch out. Never merge cells inside a data range that will be sorted, filtered, or used by a PivotTable. Keep merging, if at all, to titles above the data.

Borders

The Borders button remembers the last border you used, so you can apply it repeatedly with one click. For full control open Format Cells › Border: choose a line style and colour first, then click the preset or the edges in the preview. Home › Font › Borders › Draw Border lets you paint borders with the mouse. Light grey borders look more modern than heavy black ones.

Row height and column width

  • Drag the boundary between column letters to resize; double-click it to AutoFit.
  • For an exact width: Home › Cells › Format › Column Width and type a value.
  • ##### in a cell means the column is too narrow to show the number or date. Widen the column; the value is not lost.
  • Home › Cells › Format › Hide & Unhide hides rows or columns without deleting them.

Format Painter

The Format Painter (the paintbrush in Home › Clipboard) copies formatting from one place to another.

  1. Select a cell that already looks the way you want.
  2. Click Format Painter once to paint one target, or double-click it to keep it active for several targets.
  3. Click or drag over the target cells.
  4. Press Esc to switch it off after a double-click.
Tip. To copy formatting with the keyboard, copy the source cell (Ctrl+C), select the target, then use Paste Special › Formats (Ctrl+Alt+V, then T, then Enter).

Cell styles and themes

Home › Styles › Cell Styles offers ready-made styles such as Heading 1, Total, Input, Calculation, Good, Bad and Neutral. A style is a named bundle of formatting. Using styles makes a workbook consistent, and if you modify a style (right-click it › Modify) every cell using it updates. Page Layout › Themes changes the fonts and colour palette of the whole workbook at once; theme colours in the colour picker change with the theme, standard colours do not.

Clearing formatting

Home › Editing › Clear › Clear Formats removes formatting but keeps contents. Be aware that clearing formats also removes number formats, so dates turn back into serial numbers such as 46096. That is not damage; reapply a date format.

Formatting tips that matter

  • Format whole columns of data, not individual cells, so new rows look the same. Better still, use an Excel table, which formats new rows automatically (Excel tables and structured references).
  • Avoid empty rows and columns for spacing inside data; adjust row heights instead. Empty rows break sorting, filtering and Ctrl+Arrow navigation.
  • To highlight values based on rules (top 10, overdue dates, negative numbers), use Conditional formatting, including formula-based rules rather than colouring cells by hand. Manual colours do not update when data changes.
  • Turn off gridlines for a report-style look: View › Show › Gridlines.
Note. Excel for Mac has the same Home tab groups; Format Cells opens with Cmd+1. Excel for the web supports most formatting, including Format Painter and cell styles.

Check yourself

1. Which shortcut opens the Format Cells dialog on Windows?

2. A cell shows #####. What is the most likely reason?

3. What is the safer alternative to Merge & Center for a title over A1:D1?

4. How do you apply the Format Painter to several separate ranges?

5. Why should you avoid colouring overdue invoices by hand?

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 12 KB