How to Remove Borders in Excel

Learn multiple Excel methods to remove borders with step-by-step examples, real-world scenarios, and professional tips.

excelformattingspreadsheettutorial
14 min read • Last updated: 7/2/2025

How to Remove Borders in Excel

Why This Task Matters in Excel

Borders are one of the most common formatting elements in any spreadsheet. They define table outlines, highlight totals, and make dashboards look polished. Yet in day-to-day work you often inherit workbooks bristling with borders that no longer serve a purpose. Perhaps you imported a CSV file that applied default gridlines as borders, combined reports from different departments whose styles clash, or relied on a template that looked great for printing but is distracting for analysis. In each of these situations removing borders quickly and accurately is critical.

Imagine a finance analyst consolidating quarterly results from five subsidiaries. Each file arrives with heavy black outlines around every cell. When the analyst tries to use Excel’s “Remove Duplicates,” conditional formatting, or Power Query, the thick gridlines slow navigation and obscure error checks. With the borders gone, the analyst can spot negative variances in red or green, apply dynamic tables, and focus on the story rather than the cosmetics.

Another real-world example is a supply-chain planner who exports an inventory report from an ERP system. The export treats every cell as a separate bordered block, which prints nicely but makes pivot-table creation cumbersome. Clearing borders restores Excel’s default grid, allowing the planner to reshape the data, add slicers, and share clean interactive dashboards with stakeholders.

Borders also affect accessibility and performance. Heavy borders on tens of thousands of cells increase file size and can slow screen refresh on older machines. Removing unnecessary borders reduces workbook weight, improves scroll speed, and helps screen-reader users by removing redundant “vertical line” or “horizontal line” announcements.

Finally, mastering border control connects directly to other Excel skills: conditional formatting, table styles, themes, and VBA automation. When you understand how to strip borders confidently, you can rebuild consistent styles programmatically, document changes for auditing, and avoid cascading visual errors when templates evolve. In short, the ability to remove borders quickly isn’t just cosmetic; it underpins data clarity, collaboration, performance, and professional presentation.

Best Excel Approach

For most users, the fastest and most reliable way to remove borders is through Excel’s built-in “Borders” command on the Ribbon, specifically the “No Border” option. This method is preferred because it:

  • Works in every supported version of Excel (Windows, macOS, and even Excel for the web)
  • Retains other cell formatting such as font, fill color, and number format
  • Responds immediately to the current selection, so you can control the scope precisely
  • Can be coupled with a keyboard shortcut for power-user speed

When should you choose this Ribbon method? Use it any time you need a one-off cleanup, or when you can select all affected cells without running complex searches. If you require automated removal across dozens of sheets or need conditional logic (for example, remove borders only from empty cells), a VBA macro or the “Clear Formats” command may be more appropriate.

Prerequisites: nothing beyond a standard Excel installation. Make sure you can see the “Home” tab. If the Ribbon is collapsed, press Ctrl + F1 (Windows) or Command + Option + R (macOS) to expand it.

Logic overview: The “No Border” command sets the LineStyle property of the selected cell(s) to “None.” In practice, you select a range, click “No Border,” and Excel silently runs the equivalent VBA instruction shown below.

Selection.Borders.LineStyle = xlNone

Alternative—keyboard shortcut (Windows Excel 365 and 2019):

Alt, H, B, N

Press the keys sequentially, not simultaneously: Alt reveals Ribbon KeyTips, H selects the Home tab, B opens the Borders menu, N triggers No Border.

macOS equivalent: Press Command + Option + Zero (⌘ ⌥ 0) after activating the Borders menu with Control + Option + B.

Parameters and Inputs

Because border removal is a formatting action, the primary “input” is the range you select:

Required input

  • Range: Any contiguous or non-contiguous cell selection. Use [A1:D10], a full column selection like [B:B], a full row [4:4], or the entire sheet with Ctrl + A twice.

Optional parameters (if you automate with VBA)

  • Sheet object: By default, Excel targets the active sheet. In VBA you can loop through Sheets(\"January\") or Worksheets(1).
  • Border index: You can target specific edges, for example xlEdgeTop or xlInsideHorizontal. This allows partial removal.
  • Condition: Use an If statement to examine cell content or style before stripping borders.

Data preparation

  • Freeze panes or hide columns if you need to protect areas from accidental selection.
  • Unmerge cells before batch removal to avoid “Cannot change part of a merged cell” alerts.
  • Consider applying a filter to isolate rows if you only want to affect certain records.

Validation rules

  • Excel will not allow border commands on protected sheets without appropriate permissions. Unprotect first or ensure the “Format cells” option is checked.
  • A table style might reapply borders automatically when the table range changes. Confirm auto-formatting rules after removal.

Edge cases

  • Cells inside Grouped rows may appear borderless but acquire style when groups are expanded.
  • Conditional formats defining a border will override manual removal next time the rule recalculates. Delete or adjust the rule if borders re-appear.

Step-by-Step Examples

Example 1: Basic Scenario – Cleaning a Simple Data Block

Suppose you imported sales data into [A1:E15]. Every cell has a thin black border, but you want a clean grid so you can add your own formatting.

  1. Select the entire block [A1:E15].
  • Click A1, press Ctrl + Shift + End to reach the last populated cell.
  1. On the Ribbon, go to Home ▶ Font group ▶ Borders drop-down (the square icon with four windowpanes).
  2. Click “No Border.” Instantly, all cell edges vanish, revealing Excel’s default gridlines.
  3. Verify with Print Preview: File ▶ Print. You should now see no solid lines on the printout.
  4. Apply your desired format, such as a thick border around [A1:E1] for headers and a total line border on [A16:E16].

Why this works: The command sets all border properties for the selected range to “None,” leaving fills and fonts intact. By selecting only the data block, you preserve any existing styling outside it.

Variations

  • If you only want to remove internal borders yet leave an outside outline, choose “Inside Borders” ▶ No Border, then “Outside Borders” to redraw the frame.
  • To speed up, press Alt → H → B → N (Windows) after the selection step.

Troubleshooting

  • Borders not disappearing? Double-check you selected cells, not chart objects.
  • Still see faint lines? They may be gridlines (worksheet display) not borders. Turn them off under View ▶ Gridlines.

Example 2: Real-World Application – Resetting an Imported ERP Report

Context: A logistics manager receives a monthly CSV export detailing part numbers, stock levels, and reorder points. After opening in Excel, every cell from [A1:K4000] has a dotted outline that interferes with conditional formatting rules highlighting low stock.

Steps

  1. Convert the data into a structured table first: Select any cell in the data, press Ctrl + T, and ensure “My table has headers” is checked.
  2. Notice the table style adds its own borders. To standardize appearance, click the Table Design tab ▶ Table Styles ▶ “None.” The dotted outlines remain because they are cell borders, not part of the table style.
  3. Select the entire table body quickly: Hover until the mouse cursor turns to a diagonal arrow in the top-left corner of the table and click once.
  4. Remove borders via keyboard: Alt → H → B → N.
  5. Apply your conditional formatting: Home ▶ Conditional Formatting ▶ New Rule ▶ Format cells that contain → Cell Value → less than → threshold. Pick a red fill, no border.
  6. Refresh the table with new data next month. Borders remain cleared because Excel remembers the “No Border” setting unless imported data reintroduces formatting.

Business impact: Clear borders allow the manager to spot parts below reorder points faster. The file size drops 25 percent (from 3.2 MB to 2.4 MB) because Excel no longer stores thousands of border properties.

Integration with other features

  • PivotTables built from the table inherit the clean look, improving executive dashboard readability.
  • Power Query refresh still works because removing borders does not touch underlying values.

Performance considerations

  • On large ranges, border removal is instantaneous, but applying it to entire sheet [A:XFD] can slow down older PCs slightly. Focus on the used range to maintain speed.

Example 3: Advanced Technique – VBA Macro to Strip Borders Across Multiple Sheets

Scenario: A project accountant maintains a 12-sheet workbook, one sheet per month. Each sheet accumulates daily entries with various borders applied manually by several clerks. He needs one-click cleanup before publishing to the CFO.

Macro outline

Sub RemoveAllBorders()
    Dim ws As Worksheet
    Application.ScreenUpdating = False
    For Each ws In ThisWorkbook.Worksheets
        'Skip hidden or very_hidden sheets if desired
        If ws.Visible = xlSheetVisible Then
            ws.Cells.Borders.LineStyle = xlNone
        End If
    Next ws
    Application.ScreenUpdating = True
    MsgBox "Borders removed from all sheets!", vbInformation
End Sub

Walkthrough

  1. Press Alt + F11 to open the Visual Basic Editor.
  2. Insert ▶ Module, paste the macro above.
  3. Close the editor and run the macro: Developer ▶ Macros ▶ RemoveAllBorders ▶ Run.
  4. Observe each sheet flash briefly (screen updating is off so it’s fast). All borders vanish, even those on protected sheet data.
  5. Reapply standardized styles: Use Cell Styles ▶ Input for data entry cells, Cell Styles ▶ Output for calculated results, and manually place thick outlines around monthly totals.

Advanced details

  • The macro targets the entire Cells collection, so merged-cell warnings do not appear.
  • If conditional formatting rules add borders, you must iterate through FormatConditions collection and set .Borders.LineStyle = xlNone there as well.
  • You can add logic: If Len(ws.Name) = 3 Then … to target only monthly sheets.

Performance optimization
Turning off screen updating speeds execution up to 10× on large workbooks. You can also set Application.Calculation = xlCalculationManual during the loop if you have volatile formulas.

Professional tips
Save a separate backup before running any large-scale macro. Use digital signatures if you distribute the macro in a corporate environment, and document the macro in the workbook’s audit sheet.

Tips and Best Practices

  1. Use selection shortcuts first. Press Ctrl + Space to select a column or Shift + Space to select a row, then remove borders in one go.
  2. Combine “No Border” with “Outside Borders” to produce clean tables: first strip everything, then apply a single outline for clarity.
  3. When designing templates, define cell styles without borders. That way users add borders intentionally, not by default.
  4. For dashboards, replace solid borders with light gray fill shading in alternate rows; it prints cleaner and avoids border misalignment in PDF exports.
  5. Automate repetitive cleanup with Quick Access Toolbar (QAT): right-click the Borders button, choose “Add to Quick Access Toolbar,” and use Alt + (1-9) to execute instantly.
  6. Document your formatting conventions in a hidden “ReadMe” sheet so colleagues understand why borders were removed and what standards to follow.

Common Mistakes to Avoid

  1. Removing only visible borders: Users sometimes forget hidden rows/columns carry borders too. Always unhide everything or select the whole sheet with Ctrl + A twice.
  2. Confusing gridlines and borders: Gridlines are display settings; turning them off does not remove actual cell borders. Verify by switching to Print Preview.
  3. Clearing formats unintentionally: The “Clear Formats” command deletes borders plus fills, fonts, and number formats. Use it only when you intend a total reset.
  4. Editing within a filtered range: Removing borders while a filter is active only affects visible rows. Clear the filter or select the entire column to apply changes uniformly.
  5. Overusing macros without backup: A macro deleting borders across all sheets is irreversible with a single Undo step. Save a versioned copy or enable Track Changes before running.

Alternative Methods

Below is a comparison of popular border-removal techniques.

MethodSpeedKeeps Other FormatsScope ControlRequires VBABest For
Ribbon ▶ No BorderFastYesManual selectionNoEveryday tasks
Keyboard Alt → H → B → NVery fastYesManual selectionNoPower users
Clear FormatsFastNoManual selectionNoTotal reset
Format Painter (double-click)ModerateDepends on sourcePreciseNoCopying clean style
Cell StylesFast after setupYesSheet-wide via Find/Replace StylesNoTemplate standardization
VBA macro (see Example 3)Fast on repeat runsYesFull automationYesMulti-sheet cleanup

Pros and cons

  • Ribbon and keyboard methods are universally accessible but manual.
  • Clear Formats ensures a pristine slate yet wipes fills, number formats, and fonts too.
  • Format Painter is granular but slower for large blocks.
  • Cell Styles enforce consistency but need upfront design.
  • VBA offers power and repeatability yet introduces macro-security considerations.

When to switch methods

  • Use Ribbon or keyboard for ad-hoc tasks.
  • Invoke Clear Formats before redesigning a report from scratch.
  • Deploy VBA when you must process multiple workbooks every reporting cycle.

FAQ

When should I use this approach?

If you simply want to eliminate existing borders while keeping other cell formatting intact, choose the Ribbon “No Border” command or its keyboard shortcut. It is ideal for quick clean-ups and avoids collateral formatting loss.

Can this work across multiple sheets?

Yes. Manually, you can group sheets by selecting the first sheet, holding Shift, and clicking the last sheet, then apply “No Border.” All grouped sheets receive the change. Programmatically, a VBA loop (see Example 3) provides a faster, safer way to hit every sheet.

What are the limitations?

Manual selection becomes cumbersome on very large or non-contiguous ranges. Additionally, borders created by conditional formatting rules will re-appear unless you modify or delete those rules. Protected sheets may block border changes if the “Format cells” permission is disabled.

How do I handle errors?

If Excel warns that it “Cannot change part of a merged cell,” unmerge the selection first: Home ▶ Merge & Center ▶ Unmerge. If borders re-appear after you remove them, inspect conditional formatting rules, table styles, or macros that might be re-applying formatting on recalculation.

Does this work in older Excel versions?

Yes. The border menu and the Alt-sequence shortcut (Alt, H, B, N) are available back to Excel 2007 on Windows. On macOS, shortcuts differ slightly, but the Ribbon option exists in Excel 2011 and later. VBA code shown uses properties unchanged since Excel 97.

What about performance with large datasets?

Border removal itself is lightweight, but selecting millions of cells can freeze the screen for a few seconds. Scroll to the end of used range first (Ctrl + End) and limit your selection. In macros, toggle ScreenUpdating and Calculation to Manual for large jobs.

Conclusion

Knowing how to remove borders in Excel seems small, yet it unlocks cleaner data presentations, lighter workbooks, and faster analysis workflows. From a simple Alt → H → B → N keystroke to a full VBA routine traversing dozens of sheets, you now have a toolkit for every situation. Mastering these techniques not only improves the aesthetics of your spreadsheets but also reinforces best practices in formatting, automation, and collaboration. Continue exploring related skills such as cell styles, conditional formatting, and macro security to elevate your Excel proficiency further. With the clutter gone, your data—and your insights—stand out.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.