VB to erase 2 Columns from every sheet

K

Kevin M

Hi all, TIA..

I have a sheet here with erroneous data on every F, G,
and H column in 115 sheets labeled Dec 4 - Mar 31. Can
someone help with the VB to highlight and delete these
three columns in the affected sheets?

Thanks!

Kevin M
 
P

Paul B

Kevin, this macro will delete columns F:H in ALL worksheets in the workbook

Sub Delete_Columns_F_G_H()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Columns("F:H").Delete Shift:=xlToLeft
Next ws
End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
K

Kevin M

Thanks Paul, i'll give it a spin. :)

Kevin M
-----Original Message-----
Kevin, this macro will delete columns F:H in ALL worksheets in the workbook

Sub Delete_Columns_F_G_H()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Columns("F:H").Delete Shift:=xlToLeft
Next ws
End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top