Answers for "vba loop sheet tab and delete certain columns"

VBA
0

vba excel delete column

' Deletes 3rd column
ThisWorkbook.Worksheets(1).Columns(3).EntireColumn.Delete

' Deletes 3rd column of a range
Range("My_RANGE").Columns(3).EntireColumn.Delete
Posted by: Guest on January-15-2021
0

vba excel delete every other row

Sub Delete_Even()
 
 Application.ScreenUpdating = False
lr = Cells(ActiveSheet.Rows.Count, 1).End(xlUp).Row
 
If lr Mod 2 = 0 Then
Else
lr = lr - 1
End If
 
For i = lr To 1 Step -2
    Rows(i & ":" & i).Delete Shift:=xlUp    
Next i
 
  Application.ScreenUpdating = True
 
End Sub
Posted by: Guest on February-02-2021

Code answers related to "VBA"

Browse Popular Code Answers by Language