How to Add Lines in an Excel Spreadsheet
Adding lines in Excel sounds simple, but the phrase means different things depending on what you're trying to do. You might want to insert a new row or column into your data, draw a visible border line around cells, or add a diagonal line inside a cell. Each of these is a distinct operation — and knowing which one applies to your situation changes everything.
What "Adding Lines" Actually Means in Excel
Excel users use the word "line" loosely, so it's worth separating the three most common interpretations before diving in:
- Inserting rows or columns — adding blank space into your spreadsheet structure
- Adding cell borders — applying visible lines around or between cells for visual organization
- Drawing lines as shapes — placing actual line objects on top of the spreadsheet
Each method lives in a different part of Excel and serves a different purpose.
How to Insert a New Row or Column 📋
This is the most common need. You have existing data and you need to add a blank row between two rows, or squeeze in a new column.
To insert a single row:
- Click the row number on the left side of the spreadsheet (e.g., click "5" to select the entire row 5)
- Right-click and choose Insert
- Excel shifts everything down and adds a blank row above your selection
To insert multiple rows at once:
- Click and drag across multiple row numbers to select the same count you want to insert
- Right-click and choose Insert
- Excel inserts exactly that many blank rows
The same logic applies to columns — select column letters at the top, right-click, and insert. New columns appear to the left of your selection.
Keyboard shortcut: Select a row or column, then press Ctrl + Shift + "+" (Windows) or Cmd + Shift + "+" (Mac) to insert instantly.
Inserting Rows Based on Your Excel Version
The core steps above work across Excel 2016, 2019, 2021, and Microsoft 365. The right-click menu layout is nearly identical across these versions, though Microsoft 365 subscribers occasionally see updated interface styling that doesn't change the underlying function.
How to Add Borders (Visible Lines Between Cells)
Borders are the lines you draw around cells to make tables, forms, or data grids easier to read. They don't affect your data — they're purely visual.
Basic method:
- Select the cells you want to add borders to
- Go to Home → look for the Font group → click the dropdown arrow next to the border icon (it looks like a square divided into four)
- Choose your border style: outside border, all borders, thick box border, etc.
For more control:
- Select your cells
- Right-click → Format Cells → click the Border tab
- Here you can choose line style, color, and exactly which edges get a border (top, bottom, left, right, inside horizontal, inside vertical)
This level of control matters when you're building a formatted report or a printable form where specific lines need to appear in specific places.
Common Border Styles and When They're Used
| Border Type | Best Used For |
|---|---|
| All Borders | Data tables where every cell needs definition |
| Outside Border | Highlighting a selected range as a block |
| Thick Box Border | Emphasizing headers or summary rows |
| Bottom Border Only | Underlining header labels |
| No Border | Removing existing border formatting |
How to Draw a Line as a Shape 🖊️
Sometimes you need an actual drawn line — for example, a diagonal line through a cell, or a line separating sections on a dashboard layout.
To insert a line shape:
- Go to Insert → Illustrations → Shapes
- Under the Lines section, choose the style (straight line, arrow, curved line, etc.)
- Click and drag on the spreadsheet to draw it
These lines float above the spreadsheet grid — they aren't attached to specific cells and won't move automatically if you insert rows or columns later. That's an important distinction if your layout is going to change.
For a diagonal line inside a cell:
- Select the cell
- Right-click → Format Cells → Border tab
- Click the diagonal line button in the preview area (you'll see two diagonal options — top-left to bottom-right, or the reverse)
This is commonly used in header cells that label both a row and a column simultaneously.
Factors That Affect Which Method You Need
Several variables determine which approach is right for a given situation:
- Purpose: Structural data entry needs row/column insertion. Visual formatting needs borders. Annotations or diagrams need drawn shapes.
- Print layout: Borders print reliably. Drawn shapes can shift depending on print settings and page breaks.
- Shared workbooks: Formatting applied through borders is more stable across users and devices than floating shapes, which can misalign on different screen resolutions.
- Excel vs. Google Sheets: The border and insert row functions work nearly identically in Google Sheets, but the Shapes/Drawing tool lives under Insert → Drawing and works differently from Excel's shape layer.
- Mac vs. Windows: Keyboard shortcuts differ slightly, and some older versions of Excel for Mac had a more limited border customization panel than the Windows version.
When the Same Spreadsheet Needs All Three
It's common to use all three line types in a single workbook. A financial report might insert new rows as months are added, use cell borders to define the table structure, and include a drawn line to separate a summary section from raw data. Understanding that these are three separate systems — structure, formatting, and drawing — helps you troubleshoot when something looks off or doesn't behave the way you expected.
How far any of these methods gets you depends on what your spreadsheet is actually trying to do, how it's shared, and which version of Excel you're working in. Those details shift the answer more than the steps themselves do.