To highlight a box in Excel, select the cell or rectangular range, then choose Home > Fill Color and pick a color. To draw an outline around the box instead, select the range and use Home > Borders. The fill or border remains after you click elsewhere; the temporary selection outline does not.
What You’ll Need
- An Excel workbook open in Microsoft Excel for Microsoft 365 on Windows.
- The cell or rectangular range you want to highlight. A reference such as B2:E6 means the box begins at B2 and ends at E6.
- A color in mind, if you want to shade the cells. Use a pale fill if the box contains text or numbers that should remain easy to read.
You do not need a formula or add-in for a basic highlight. The instructions below use Excel’s standard ribbon commands. Excel for Mac and Excel for the web have similar Fill Color and Borders controls, though the ribbon layout may look slightly different.
Step-by-Step
- Open the worksheet and identify the box. Decide whether you want to shade one cell, a block of adjacent cells, or simply put a visible frame around a group. A box in this context is usually a rectangular cell range, not a drawn shape. If the data is in B2 through E6, for example, the box is B2:E6. Knowing the first and last cells helps you avoid including nearby headings or totals by mistake.
- Select the cell or range. For a small area, click the first cell, then hold the left mouse button and drag to the last cell. For a larger range, click the first cell, hold Shift, and click the last cell. You can also click the Name Box to the left of the formula bar, type a range such as
B2:E6, and press Enter. Excel selects the entire rectangle even if some rows or columns are off-screen. - Check the selection before formatting. A shaded selection border and highlighted row or column headings indicate which cells are selected. If you used the Name Box, look at the address shown there to confirm it matches the intended range. If you have selected the wrong area, click a blank cell and select the correct range again. Applying a fill or border affects every selected cell, so this quick check can prevent a large formatting cleanup.
- Apply a fill color to shade the cells. On the ribbon, choose Home > Fill Color, the paint-bucket button in the Font group. Click its drop-down arrow to see the theme colors, standard colors, and any available recent colors, then select the color you want. Clicking the main paint-bucket button rather than its arrow usually applies the most recently used fill color. If that is not the color you want, use the arrow to choose a different one.
- Choose a readable color. A light tint is often a good choice for a range containing text, dates, or numbers because it keeps the cell contents legible. Dark fills can work for labels or decorative bands, but check that the font color has enough contrast. The fill changes the cell background; it does not change the value, formula, or number format stored in the cell.
- Add an outline if you want a defined box edge. Keep the range selected, choose Home > Borders, and select Outside Borders to frame the selected area. Use All Borders if you also want lines between each cell inside the box. These are different effects: Outside Borders draws the perimeter, while All Borders adds internal grid lines as well. The Borders button may show a small grid icon and a drop-down arrow.
- Adjust the outline when needed. To change the border’s color or line style, open the Borders drop-down and choose More Borders or Format Cells, depending on the ribbon layout. In the Format Cells dialog, use the Border tab to choose a line style and color, then click the sides of the preview that should have a line. Confirm with OK. If you only need a standard thin outline, the Outside Borders command is quicker.
- Click another cell to check the result. Once you click away, the moving selection outline disappears, but the applied fill and borders should remain. This is a useful check because the active selection can look like a highlight even when no formatting has been applied. If the color vanishes as soon as you move the selection, repeat the Fill Color step and choose a color from its drop-down.
- Remove or change the highlight if necessary. Select the same range again. To remove its background, choose Home > Fill Color > No Fill. To remove borders, open Home > Borders > No Border. These commands remove the selected formatting; they do not delete cell contents. If you only want a different color, select the new color from Fill Color rather than clearing the fill first.
- Save the workbook. Press Ctrl+S on Windows after you have checked the result. On a Mac, use Command+S. If Excel asks where to save a new workbook, choose a folder and file name. In Excel for the web, changes are generally saved to the workbook in OneDrive or SharePoint automatically, but make sure the status indicates that the latest changes have been saved.
For a box that should be highlighted only when its contents meet a condition, use conditional formatting instead of applying a permanent fill. Select the range and choose Home > Conditional Formatting, then pick an appropriate rule, such as Highlight Cells Rules. Set the condition and format, then confirm. The color will appear or disappear as cell values change. The exact rule depends on what you want to detect, so check the preview before applying it across a large range.
Common Mistakes
- Confusing selection with formatting. Excel outlines the active cell or selected range while you work. That outline is temporary and will not print as a highlight. Apply Fill Color or a border if the effect must remain visible after clicking elsewhere.
- Using the wrong color button. Font Color changes the color of the letters and numbers, while Fill Color changes the cell background. The icons are close together in the Home tab. If the text changed but the background did not, undo with Ctrl+Z on Windows or Command+Z on Mac, then use Fill Color.
- Selecting too many or too few cells. A range that includes a blank row, total, or heading may produce a box that looks uneven or colors data you did not intend to emphasize. Confirm the address in the Name Box before applying formatting.
- Choosing a fill that makes the contents hard to read. Very dark or saturated colors can reduce contrast, especially with black text. Use a lighter shade or adjust the font color deliberately if a dark band is part of the design.
- Expecting the border to shade the cells. Borders add lines around or between cells; they do not fill the background. Apply both Fill Color and Outside Borders if you want a colored box with a crisp perimeter.
Tips
- Use a consistent highlight palette. Give similar meanings similar colors throughout the workbook, such as one tint for inputs and another for results. A small, consistent palette makes a sheet easier to scan than many unrelated colors.
- Keep important data accessible. Do not rely on color alone to communicate a status. Pair a highlight with a label, value, or clear border, which helps readers who print in grayscale or have difficulty distinguishing colors.
- Apply the same formatting to more than one area. Select a nonadjacent range by holding Ctrl on Windows while clicking or dragging each additional range, then apply the formatting. On Mac, use Command while selecting additional ranges. If the areas are complex or selection becomes difficult, format each range separately to avoid affecting unintended cells.
- Use Format Painter for a repeated style. Select a cell with the fill and border you want, choose Home > Format Painter, then drag across the target cells. Double-click Format Painter if you need to apply the style to several separate places; press Esc when finished. It copies formatting, so inspect the target cells if they already use special number or font formatting.
- Think about printing and accessibility. A very pale fill can look different on a monitor and on paper. Use Print Preview to check a printed sheet, and use borders or labels alongside color where the distinction matters.
Troubleshooting
- The fill color does not appear. Confirm that the intended cells are selected, then choose Home > Fill Color and pick a color from the arrow menu. If the cells already have a fill, try another shade to verify the change. If a conditional formatting rule controls the appearance, its formatting may take precedence; check Home > Conditional Formatting > Manage Rules and review rules that apply to the range.
- The highlight disappears when you click away. You are probably seeing Excel’s temporary selection indicator rather than a cell fill. Select the range again and choose a color with Fill Color. Click elsewhere to confirm the fill remains.
- Only part of the box has a border. Select the full range again and choose Home > Borders > Outside Borders. If the cells inside also need dividing lines, choose All Borders. Check that the range selection includes the entire intended rectangle.
- The ribbon buttons are unavailable. The worksheet may be protected, or you may be viewing a read-only copy. Check Review > Unprotect Sheet if you have permission and the password, or ask the workbook owner for editing access. If the file is in Protected View, use the appropriate editing option only if you trust the file’s source.
- The highlight looks different on another device or in print. Theme colors can render differently with display settings, and printer output may be lighter. Check the workbook in the intended viewing environment, use a standard theme color, and preview the printed page. A border and a clear label can preserve the meaning when the fill is hard to see.
Frequently Asked Questions
How do I highlight just one cell in Excel?
Click the cell, choose Home > Fill Color, and select a color. If you want a box around that single cell rather than a shaded background, choose Home > Borders > Outside Borders.
How do I highlight a whole row or column?
Click the row number or column letter to select it, then apply Fill Color. To highlight only part of a row or column, select the specific cells instead. This avoids coloring cells outside the section you want to emphasize.
How can I highlight a box without changing its contents?
Fill Color and Borders change formatting, not cell values or formulas. Select the range and apply the fill, border, or both. Avoid typing into the cells while the range is selected if you only intend to change its appearance.
Can I highlight a box automatically when a value changes?
Yes. Select the range and use Home > Conditional Formatting to create a rule based on a value, text, or other available condition. The fill then updates when the cell contents meet or stop meeting the rule.
Will the highlight show up when I print the worksheet?
Cell fills and borders normally print with the worksheet, though the final appearance depends on printer settings and color output. Check File > Print to preview it. The temporary selection outline does not print.
Can I highlight a box in Excel for Mac or Excel for the web?
Yes. Select the cells and use the Home tab’s Fill Color or Borders control; the commands may be arranged differently from the Windows ribbon. On Mac, common undo and save shortcuts are Command+Z and Command+S. Excel for the web provides the same basic cell-formatting options in its browser ribbon.
Related
- Inventory List Spreadsheet Template: Build and Use One
- Google Sheets Inventory Spreadsheet: Setup and Tips
- Inventory Spreadsheet App: How to Choose and Use One
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Set Out of Office in Outlook on the Web: Step-by-StepTo set an out-of-office reply in Outlook on the web, open Settings, find Automatic replies, turn them on,…
- Google Sheets Date Math: Formulas, Examples, and TipsGoogle Sheets date math works by treating dates as serial numbers, so you can subtract one date from…
- Google Sheets Project Tracker: Setup and Best PracticesA Google Sheets project tracker is a shared spreadsheet for organizing tasks, owners, deadlines, priorities, and progress in…
- Excel Scatter Plot With Named Points: Add Name LabelsTo show names beside points in an Excel scatter plot, put the names in worksheet cells, select the…
- Microsoft Word Booklet: Set Up Pages, Format, and PrintTo create a booklet in Microsoft Word for Microsoft 365 on Windows, open Layout > Margins > Custom…
- Highlight the Largest Number in ExcelTo highlight the largest number in an Excel range, select the cells, choose Home > Conditional Formatting >…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.