Excel Tutorial: Insert Multiple Rows with Macros - Step by Step Guide in Tamil
Coding to add macro in Excel
Sub Insert_Multiple_Rows()
On Error GoTo Handler
' Get the number of rows to insert from the user
Dim row_num As Integer
row_num = InputBox("Enter the number of rows to insert:", "Insert Rows")
' Insert the rows below the active cell
ActiveCell.Offset(1).Resize(row_num).EntireRow.Insert
Handler: Exit Sub
End Sub
0 Comments