To insert lines (blank rows) between data in Excel, right-click the row number below where you want the gap to appear and select Insert. This pushes the existing data down and creates a clean, empty row. Depending on whether you need a single line or hundreds of gaps, you can use manual clicks, keyboard shortcuts, or a sorting trick for bulk insertion.
Inserting lines is primarily used to visually separate categories of data, create space for manual notes, or prepare a sheet for better readability before printing. Before starting, ensure your data is not formatted as an official "Excel Table" (Insert > Table), as tables handle row insertion differently to maintain structured data integrity. If your data is in a table, you can still insert rows, but the formatting will automatically apply to the new line.
What You'll Need
- A computer with Microsoft Excel installed (Windows or macOS).
- An existing spreadsheet containing the data you wish to separate.
- A mouse or keyboard for navigation.
Step-by-Step
Method 1: Inserting a Single Row Manually
- Open your Excel workbook and locate the row where you want to insert a blank line.
- Right-click on the row number (the grey column on the far left) directly below where the new line should go.
- From the context menu that appears, click Insert.
- Excel will shift the selected row and all rows below it down by one, leaving a blank row in its place.
Method 2: Using Keyboard Shortcuts
- Click any cell in the row below where you want the new line to appear.
- Press Shift + Spacebar to select the entire row.
- Press Ctrl + Shift + Plus (+) on Windows, or Command + Shift + Plus (+) on Mac.
- A blank row is instantly inserted above your selection.
Method 3: Inserting Multiple Non-Adjacent Rows
- Hold down the Ctrl key (Windows) or Command key (Mac).
- Click the row numbers for every location where you want a blank line. For example, click row 5, row 10, and row 15.
- Release the Ctrl/Command key.
- Right-click on any of the highlighted row numbers.
- Select Insert. Excel will place one blank row above every selected row simultaneously.
Method 4: Inserting Blank Lines Between Every Row (The Sorting Trick)
- Create a "Helper Column" to the right of your data. In the first cell of this column, type 1.
- In the cell below it, type 2.
- Highlight both cells and drag the fill handle (the small green square at the bottom-right of the selection) down to the end of your data. This creates a numbered list (1, 2, 3, etc.).
- Copy these numbers.
- Scroll to the bottom of your data and paste the numbers directly underneath the last entry in the helper column. You now have two identical sets of numbers (e.g., 1–100 and 1–100).
- Click any cell in the helper column.
- Go to the Data tab on the ribbon and click Sort A to Z.
- Because there are now two "1s", two "2s", and so on, Excel will pair them together, effectively placing a blank row between every single line of data.
- Delete the helper column by right-clicking the column letter and selecting Delete.
Common Mistakes
- Selecting cells instead of rows: If you select a range of cells and click "Insert," Excel will ask if you want to shift cells down or right. To insert a full line across the entire sheet, always select the row number on the left.
- Overwriting data: Be careful when dragging and dropping cells to create space; using the "Insert" command is the only way to ensure no data is overwritten.
- Forgetting the helper column: When using the sorting trick, if you forget to copy the numbers a second time, the sort will happen, but no blank lines will be created.
- Applying to Tables: Attempting to use the sorting trick inside a formatted "Excel Table" can sometimes cause errors with structured references. Convert the table back to a range (Table Design > Convert to Range) first if the trick fails.
Tips
- Repeat the Action: After inserting one row manually, you can click another row and press F4 (Windows) to repeat the last action instantly.
- Formatting Blank Rows: To make your inserted lines stand out, select the blank row and use the Fill Color tool (paint bucket icon) to give it a light grey or colored background.
- Consistent Height: If your inserted rows are too tall or too short, highlight all rows, right-click a row number, select Row Height, and enter a specific value for uniformity.
Troubleshooting
If the "Insert" option is greyed out or not working, try these steps:
- Check for Sheet Protection: If the workbook is protected, you cannot insert rows. Go to the Review tab and click Unprotect Sheet. You may need a password.
- Check for Array Formulas: If your data is part of an array formula (like FILTER or UNIQUE), you cannot insert a row in the middle of the array's output range. You must insert the row outside the array or change the source data.
- Clear Frozen Panes: Sometimes, if you are trying to insert rows near a "Frozen Pane" (View > Freeze Panes), the visual movement can be confusing. Try unfreezing panes to see if the row was actually inserted.
- Check for Merged Cells: Merged cells can often block the insertion of rows or cause them to behave unexpectedly. Unmerge cells (Home > Merge & Center > Unmerge Cells) and try again.
Frequently Asked Questions
Can I insert blank rows automatically based on a value change?
Yes, but this requires using a VBA macro or a complex Power Query transformation. There is no built-in "Insert row if value changes" button in standard Excel.
How do I remove the blank lines I just inserted?
The fastest way is to select your data, press Ctrl + G, click Special..., select Blanks, click OK, then right-click one of the selected blank cells and choose Delete > Entire row.
Will inserting rows break my formulas?
Generally, no. Excel automatically updates cell references in formulas. If a formula was adding A1 and A2, and you insert a row between them, the formula will automatically update to add A1 and A3.
Does the sorting trick work for very large datasets?
Yes, it is actually the most efficient method for datasets with thousands of rows, as it avoids the lag associated with inserting rows one by one.
Can I insert a column instead of a row?
Yes. Instead of right-clicking the row number, right-click the column letter (A, B, C) at the top and select Insert.