Delete columns simultaneously in several different workbooks

  • Thread starter Thread starter gjalt.lindeboom
  • Start date Start date
G

gjalt.lindeboom

Hi!

Hope somebody has a bood tip for me on this problem, thanx in advance!

If I want to delete several columns in all the workbooks which are in
one folder, is there a quick solution to this? For example: Folder A
has a 100 Excel (2003) workbooks, and in all of those I want to delete
columns J through P. Should that be done manually or is there a trick?

Thanx!

Gjalt
 
This is not a trick, simply a specific routine VBA was designed to do:

For i = 1 To 100
Workbooks.Open Filename:="C:\Excel\Book" & i & ".xls"
Sheets("Sheet1").Select
Columns("C:P").Select
Selection.Delete Shift:=xlToLeft
Workbooks.Close
Next

It should be adapted to your specifications
 

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

Back
Top