Hướng dẫn insert space in excel

In Excel,you can use the right click menu to select a row above active row, but do you know how to insert blank rows in each row as below screenshot shown? Here I introduce some tricks on solving this job quickly.

Insert blank rows between each row by Sort function

Insert blank rows between each row by VBA code

Insert blank rows/columns between each row/column by Kutools for Excel

Insert blank rows between each row by Sort function

To insert blank rows between each row, you can fill a series of numbers twice firstly, then sort the numbers.

1. In adjacent number, fill a series of numbers to match the row number.

2. Copy the series numbers, and paste them in the cell following the last number.

2. Select all series numbers, click Data > Sort Smallest to Largest.

3. In the popping Sort Warning dialog, keep Expand the selection option checked, click Sort.

Now the spaces have been inserted between each row. You can remove the series number column later.

Insert blank rows between each row by VBA code

If you are familiar with macro code, here is a code also can help you.

1. Press Alt + F11 keys to enable Microsoft Visual Basic for Applications window.

2. Click Insert > Module, then copy and paste below code to the module.

VAB: Insert space between rows

Sub RowsInsertInSelectCells[]
'UpdatebyExtendoffice20180801
Dim xWS As Worksheet
Dim xCR, xR, xCC, xC, xFC, xFR As Long
Dim xFNum As Integer
Dim xRg, xCRg As Range
    On Error Resume Next
    If ActiveWindow.RangeSelection.Count > 0 Then
      xTxt = ActiveWindow.RangeSelection.AddressLocal
    Else
      xTxt = ActiveSheet.UsedRange.AddressLocal
    End If
    Set xWS = ActiveWorkbook.ActiveSheet
    Set xRg = Application.InputBox["please select the data range:", "Kutools for Excel", xTxt, , , , , 8]
    If xRg Is Nothing Then Exit Sub
    If xRg.Count > 0 Then
        xCR = xRg.Rows.Count
        xCC = xRg.Columns.Count
        xR = xRg.Row
        xC = xRg.Column
   Application.ScreenUpdating = False
    For xFC = 0 To xCC - 1
        For xFR = xCR To 1 Step -1
            xWS.Cells[xR + xFR, xC + xFC].Insert
        Next
    Next xFC
    Application.ScreenUpdating = True
    End If

End Sub

3. Press F5 key to run the code, a dialog pops out to remind you to select the working data.

4. Click OK. Now the spaces have been inserted between selected rows.

Insert blank rows/columns between each row/column by Kutools for Excel

If you want to insert blank rows or columns between each row or column quickly and easily, you can use Kutools for Excel’s Insert Blank Rows & Columns utility, which you can specify the interval of rows and number of blank rows as you need.

After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!]

1. Select the data range you want to insert blank rows or columns, click Kutools > Insert > Insert Blank Rows & Columns.

2. In the Insert Blank Rows & Columns dialog, check Blank rows or Blank columns as you need, and specify the options of Interval of and Rows.

3. Click Ok.

Tip: this utility supports undo Ctrl + Z.

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar [easily edit multiple lines of text and formula]; Reading Layout [easily read and edit large numbers of cells]; Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows [all cells are empty]; Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter [save and apply filter schemes to other sheets]; Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

Chủ Đề