Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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 |
#3
|
|||
|
|||
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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Transfer data from sheet to sheet | Excel Discussion (Misc queries) | |||
Columns in excel sheet | Setting up and Configuration of Excel | |||
linking multiple sheets to a summary sheet | Excel Discussion (Misc queries) | |||
Function to automatically insert a new sheet as a result of data entry? | Excel Worksheet Functions | |||
Naming & renaming a sheet tab | Excel Worksheet Functions |