VB to erase 2 Columns from every sheet
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 |
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 "Kevin M" wrote in message ... 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 |
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 "Kevin M" wrote in message ... 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 . |
All times are GMT +1. The time now is 02:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com