GET IN TOUCH: (213) 537 - 3054
610 S. Broadway Suite 1001 Los Angeles, CA 90014

Microsoft Excel  •  Knowledge Base

Automatically Add Borders in Excel

Learn how to make borders automatically appear as you input data using Excel conditional formatting.

FeatureConditional Formatting
Applies toExcel worksheets
Example rangeColumns A:C

01

Why use automatic borders?

One of the best easiest ways to make a spreadsheet look nice, especially if it is going to be printed, is to add borders. But, if you are constantly adding data to your spreadsheet, that means you also have to be constantly updating those borders. Below is a way to make borders appear automatically as you add data to your spreadsheet.

Workflow: Select the range, create a conditional-formatting rule, choose an outline border, and then let Excel update the formatting as the data changes.

02

Follow these steps

  1. Select the cells

    First, select the area in which you want the borders to potentially appear. I used columns A:C below.

    Excel columns A through C selected
    Select the area that will receive the automatic borders.
  2. Create a new rule

    Under Conditional Formatting, select New Rule...

    Excel Conditional Formatting New Rule option
    Open the New Rule dialog from Conditional Formatting.
  3. Use a formula

    Select the Use a formula to determine which cells to format option and type in the formula. The way conditional formatting works is by evaluating the formula following the equals sign to see if it is true. If so, it applies the formatting you select.

    You always use type the formula as if it were in the upper-left most cell, and use your dollar signs appropriately. Below, I have made it so that if anything in column A, it will format A, B, and C in the corresponding row.

    Excel conditional formatting formula option
    Choose the formula-based conditional-formatting rule.
  4. Choose the border style

    Click the Format... button. Go to the Border tab and choose Outline. Hit OK twice.

    Excel Format Cells Border tab with Outline selected
    Set the border to Outline and confirm the format.
  5. Confirm the first border

    Notice now that I have borders around the cells in row 1, whereas I did not before. That is because cell A1 is not blank, so the formatting is applied.

    Excel border applied to the first populated row
    The rule applies the outline to the populated row.
  6. Enter data

    As I enter data, the borders automatically appear.

    New Excel data with an automatically applied border
    New data receives the border automatically.
  7. Keep adding rows

    As I keep entering data, borders keep appearing.

    Additional Excel rows with automatically applied borders
    The same rule continues down the selected range.
  8. Remove data when needed

    If I take out what is in column A, the entire row loses its borders due to the way the formula was set up.

    Excel row without a border after column A data is removed
    Removing the trigger data removes the row border.
TSC partner N-able partner