Thursday, December 17, 2020

add columns as per your requirement VBA

 add columns as per your requirement

Sub InsertMultipleColumns()

Dim i As Integer

Dim j As Integer

ActiveCell.EntireColumn.Select

On Error GoTo Last

i = InputBox("Enter number of columns to insert", "Insert Columns")

For j = 1 To i

Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromRightorAbove

Next j

Last: Exit Sub

End Sub

No comments:

Post a Comment

THANKS FOR YOUR SUPPORT

Data copy paste on two another sheet with add row in google sheet by script

 function copyDataWithinWorkbook() {   var sourceSheetName = "Dashbord"; // Replace with the name of the source sheet   var target...