Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kevin M
 
Posts: n/a
Default 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   Report Post  
Paul B
 
Posts: n/a
Default

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   Report Post  
Kevin M
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfer data from sheet to sheet Jenn Excel Discussion (Misc queries) 4 January 20th 05 03:07 PM
Columns in excel sheet Waseem Setting up and Configuration of Excel 1 December 27th 04 06:06 PM
linking multiple sheets to a summary sheet greg g Excel Discussion (Misc queries) 1 December 16th 04 07:43 AM
Function to automatically insert a new sheet as a result of data entry? Mark Mulik Excel Worksheet Functions 2 November 28th 04 02:21 AM
Naming & renaming a sheet tab Cgbilliar Excel Worksheet Functions 1 November 7th 04 05:57 PM


All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"