Clear columns VBA

kishengiggs1

New Member
Joined
Jun 21, 2011
Messages
23
I would like to clear my data in columns A,B,C in 7 of my worksheets in my workbook.

I need help creating a VBA for that?

Any help is appreciated.
 

Smitty

MrExcel MVP
Joined
May 15, 2003
Messages
29,536
You can record a macro grouping the 7 sheets, then select columns A, B & C on the first sheet and delete.

That would be faster than looping through sheets too.

HTH,
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,755
An example. For the worksheets "Sheet3", "Sheet5", "Sheet7", "Sheet8", try:

Code:
Sub DelCols()
 
Worksheets("Sheet3").Columns("A:C").Clear
 
Worksheets(Array("Sheet3", "Sheet5", "Sheet7", "Sheet8")).FillAcrossSheets Worksheets("Sheet3").Columns("A:C")
 
End Sub
 

Forum statistics

Threads
1,085,587
Messages
5,384,610
Members
401,913
Latest member
chethan av

Some videos you may like

This Week's Hot Topics

Top