- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to Always Insert a Blank Row Below Instead of Above in Excel?
If you have ever tried to insert a row in Excel by clicking on the insert button, you can see that the new row will always be inserted below and above the existing cell, but when we want to insert the cell below instead of above, it will not be possible in Excel. This tutorial will explain how to always insert a black row instead of above in Excel using VBA code.
Always Insert a Blank Row Below Instead of Above
Here we will insert the VBA module and then run it to complete our task. Let's go over a simple procedure for inserting a blank row below instead of above in Excel.
Let us consider an Excel sheet where the data is similar to the data shown in the below image.
Now, when we try to insert the row directly, the row is always inserted above the selected cell.
To insert the row below, right-click on the sheet name and select view code to open the VB code, then insert, select insert module, and enter the programme in the text box, as shown in the image below.
Sub InsertRowDown() 'Updateby Nirmal Dim xRg As Range On Error Resume Next Application.ScreenUpdating = False Set xRg = ActiveCell.Offset(1, 0) xRg.EntireRow.Select Selection.Insert Shift:=xlDown Selection.ClearFormats Application.ScreenUpdating = True End Sub
Now save the module and close the vba with the Alt + Q command.
Now click on "Insert" and "Illustrations," and draw a rectangle and write something on it on the sheet as shown in the below image.
Now, right-click on the box and choose Assign Macro from the menu box; a new pop-up window will appear, as shown below.
Now, in the macro name, select Insert Row Down and click on OK to create a button to insert a new row below.
To insert a new row, click on a cell and click on the box to insert the rows below.
In this tutorial, we used a simple example to demonstrate how we can always insert a row below instead of above in Excel to highlight a particular set of data.
Kickstart Your Career
Get certified by completing the courseGet Started