Skip to main content

How to Insert Specific Number of Columns at Fixed Intervals in Excel?

Author Zhoumandy Last modified

In your daily usage of Excel, you may run into a situation that you need to add more columns between the existing columns. You can, of course, insert the columns one by one using the Insert function. But when you are facing a large data and need to insert three columns after every second or nth column, the Insert function is apparently not effective. So how can you quickly finish the task? In this tutorial, we will talk about two easy methods to solve the problem.

Use VBA code to insert specific number of blank columns into data range at fixed intervals

Use Kutools for Excel to insert specific number of blank columns into data range at fixed intervals


Use VBA code to insert specific number of blank columns into data range at fixed intervals

We can use the below "VBA code" to insert a specific number of blank columns after every nth column. Please do as follows.

1. Press the "Alt + F11" keys in Excel, and it opens the "Microsoft Visual Basic for Applications" window.

2. Click "Insert" > "Module" and paste the following macro in the "Module" Window.

Sub InsertColumnsAtIntervals()
'Updateby Extendoffice
Dim Rng As Range
Dim xInterval As Integer
Dim xColumns As Integer
Dim xColumnsCount As Integer
Dim xNum1 As Integer
Dim xNum2 As Integer
Dim WorkRng As Range
Dim xWs As Worksheet
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
xColumnsCount = WorkRng.Columns.Count
xInterval = Application.InputBox("Enter column interval. ", xTitleId, 1, Type:=1)
xColumns = Application.InputBox("How many columns to insert at each interval? ", xTitleId, 1, Type:=1)
xNum1 = WorkRng.Column + xInterval
xNum2 = xColumns + xInterval
Set xWs = WorkRng.Parent
For i = 1 To Int(xColumnsCount / xInterval)
    xWs.Range(xWs.Cells(WorkRng.Row, xNum1), xWs.Cells(WorkRng.Row, xNum1 + xColumns - 1)).Select
   Application.Selection.EntireColumn.Insert
    xNum1 = xNum1 + xNum2
Next
End Sub

3. Press the "F5" key to run this code. A prompt box pops out to remind you to select the "data range" in which you want to insert blank columns.
A screenshot showing a prompt to select a data range in Excel when using VBA to insert columns

4. Click the "OK" button. Another prompt box pops out, please enter "the number of columns intervals" in the "Enter column interval" box.
A screenshot showing a prompt asking for the column interval in VBA code to insert columns in Excel

5. Continue to click the "OK" button. The third prompt box pops out, please specify "the number of columns you want to insert at each interval" in the box.
A screenshot showing a prompt asking how many columns to insert at each interval in VBA code in Excel

6. Click the "OK" button to get the result.
A screenshot of the result showing inserted columns at fixed intervals in Excel after using VBA code


Use Kutools for Excel to insert specific number of blank columns into data range at fixed intervals

If you don’t want to use the VBA code method, the "Insert Blank Rows & Columns" feature of "Kutools for Excel" is the perfect solution for you. With this feature, you can insert the specific number of columns into data range at fixed intervals in just a few clicks.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Select the existing data range first. Then click "Kutools" > "Insert" > "Insert Blank Rows & Columns".
A screenshot showing the Kutools 'Insert Blank Rows & Columns' option in Excel

2. The "Insert Blank Rows & Columns" dialog box pops up. You can see the data range you selected in step 1 displayed in the Range box. Choose the "Blank columns" option in the "Insert type" section. And specify "the numbers of columns intervals" and "columns you want to insert at each interval". Here I input 1 and 3 separately.
A screenshot of the Kutools 'Insert Blank Rows & Columns' dialog box with options to specify column intervals and number of columns to insert

3. Click the "OK" button to finish the setting and get the result.
A screenshot showing the final result after inserting columns using Kutools

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now


Other Operations (Articles)

How To Quickly Insert A Line Based On Current Date In Excel?
Supposing there is a sheet containing a row with dates, and now I want to insert a line right to the current date which will auto change while opening the workbook every day. Is there a trick can solve it in Excel?

How To Always Insert A Blank Row Below Instead Of Above In Excel
As we all known, when inserting blank row in a worksheet, the blank row will always be inserted above the selected row or cell. But, sometimes, you may need to insert the row below the selected cell or row. How could you solve this job in Excel?

How To Insert A Blank New Row Automatically By Command Button In Excel?
In many cases, you may need to insert a blank new row into a specified position of your worksheet. In this article, we will show you how to insert a blank new row automatically by clicking on a Command Button in Excel.

How To Insert A Blank Row After Specific Text In Excel?
If you want to insert blank rows after a specific text as following screenshot shown, how to deal with it quickly and easily without inserting them manually one by one?

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


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!