sodcalculator

10 Tech How-To

Borders and Fills in Excel: Combine Them

Guide 10-28916 · Updated · Step by step

Combining borders and fills in Excel lets you turn a plain grid of cells into a clear, organized table where important data stands out at a glance. This guide walks you through applying both formatting tools together, from basic color fills and border lines to more advanced techniques like custom line styles and conditional formatting. You’ll need a spreadsheet with some data in it and, ideally, a clear idea of which cells you want to emphasize.

What You’ll Need

  • A computer with Microsoft Excel installed (2013 or later works for all steps).
  • A worksheet containing the data you want to format.
  • Basic familiarity with selecting cells and ranges.

Step-by-Step

  1. Select the cells you want to format. Click and drag to select a range, or click a single cell. To select non-adjacent cells, hold Ctrl (Windows) or Cmd (Mac) while clicking.
  2. Apply a fill color first. On the Home tab, in the Font group, click the Fill Color button (paint bucket icon). Choose a color from the palette, or click More Colors for a custom shade. The fill applies instantly to the selected cells.
  3. Add borders. With the same cells still selected, click the Borders button (the square with a grid icon) next to the fill color. Select a border style from the dropdown, such as All Borders, Outside Borders, or Thick Box Border.
  4. Customize border lines. For more control, choose More Borders at the bottom of the Borders menu. In the Format Cells dialog box, on the Border tab, you can pick a line style (solid, dashed, thick), a color, and then click the preset buttons (None, Outline, Inside) or click directly on the border preview to add or remove individual lines.
  5. Adjust the fill and border together. If you want to change both later, select the cells, right-click, and choose Format Cells. Use the Fill tab for color and patterns, and the Border tab for lines. This dialog lets you fine-tune everything in one place.
  6. Use the Format Painter to replicate. After formatting one range, click the Format Painter button (paintbrush icon) on the Home tab, then click and drag over another range to copy the exact same borders and fills.
  7. Create a table for automatic formatting. Select your data range, go to the Insert tab, and click Table. Excel applies a default style with borders and alternating fills. You can then modify the style under Table Design to match your needs.
  8. Apply conditional formatting for dynamic fills. Select the data range, go to the Home tab, click Conditional Formatting, and choose a rule like Highlight Cells Rules or Data Bars. This will automatically apply fills (and sometimes borders) based on cell values.

Common Mistakes

  • Applying borders before fills and losing them. If you add borders first, then apply a fill, the fill may cover thin borders. Always apply the fill first, or use the Format Cells dialog to set both at once.
  • Using too many colors. Overusing bright fills makes the sheet hard to read. Stick to a subtle palette, and use borders to define structure rather than relying on color alone.
  • Forgetting to clear existing formatting. When you copy formatting with Format Painter, it overwrites all existing formatting on the target cells. If you only want to copy borders, use Paste Special > Formats instead.
  • Selecting entire rows/columns accidentally. Clicking the row number or column letter selects the whole row/column, which can apply formatting to thousands of cells, slowing down your workbook. Always select only the cells you need.

Tips

  • Use a consistent color scheme. Pick one accent color for headers and a lighter shade for alternating rows. This improves readability without overwhelming the eye.
  • Use white borders for separation. If you have a dark fill, a white border can create a clean, modern look.
  • Use the Border tab’s preview. The preview area in Format Cells lets you see exactly which lines are applied, so you can avoid accidental double borders.
  • Use keyboard shortcuts. Press Ctrl+1 (Windows) or Cmd+1 (Mac) to open Format Cells quickly, then use Alt+B for the Border tab and Alt+F for the Fill tab.
  • For print, set borders to print. If borders don’t appear when printing, go to Page Layout > Print Titles and ensure the print area includes the formatted cells. Also check that the gridlines option is off if you only want your custom borders.

Troubleshooting

  • Borders don’t show on screen. Go to View > Show and check the Gridlines box. If you’re using a dark fill, thin borders may be invisible; try a thicker line style or a lighter fill color.
  • Borders don’t print. In Page Layout, under Sheet Options, check the Print box under Gridlines if you want gridlines. For custom borders, ensure they are applied to the correct cells and that the print area includes them.
  • Fill color doesn’t apply. Make sure the cells aren’t part of a table with a locked style. If they are, go to Table Design and change the style, or convert the table back to a range (right-click > Table > Convert to Range).
  • Format Painter copies too much. If you only want borders, not fills, use Paste Special after copying: select the target cells, right-click, choose Paste Special, then select Formats and click OK. This pastes all formatting, but you can then clear the fill manually.
  • Conditional formatting overrides manual fills. If you have a conditional formatting rule, it takes precedence. To change the manual fill, adjust the rule or remove it (Home > Conditional Formatting > Clear Rules).

Frequently Asked Questions

  1. Can I apply borders and fills to non-contiguous cells at once? Yes, hold Ctrl while selecting multiple ranges, then apply the formatting. The borders will be applied to each selected range independently.
  2. How do I remove borders and fills from a range? Select the range, go to Home > Fill Color > No Fill, and then Home > Borders > No Border.
  3. Can I save a custom border/fill combination as a style? Yes, select a formatted cell, go to Home > Cell Styles > New Cell Style, name it, and it will appear in the Cell Styles gallery for quick reuse.
  4. Why does my fill color look different when printed? This is usually due to printer settings. Check the printer’s color options, and try using a lighter fill or enabling ‘Print in grayscale’ if you only have a black-and-white printer.
  5. Does using borders and fills affect Excel performance? Minimal, but applying them to entire rows or columns can increase file size. Stick to used ranges.
  6. Can I use a picture as a fill? Yes, in Format Cells > Fill > Fill Effects, you can choose a gradient, but not a picture. For a picture, you’d need to insert an image behind the cells.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →