Cam
Cam

Reputation: 421

How to delete the first column in every sheet in a workbook using VBA

I have a workbook with 10+ sheets, and I need to delete the first column in every sheet.
Instead of manually doing this, I was wondering if anyone knew a short VBA macro that could do this for me?
Thanks!

Upvotes: 0

Views: 5350

Answers (1)

Gary's Student
Gary's Student

Reputation: 96791

You need to loop over all the worksheets:

Sub qwerty()
    Dim ws As Worksheet
    For Each ws In Sheets
        ws.Cells(1, 1).EntireColumn.Delete
    Next ws
End Sub

Upvotes: 5

Related Questions