How do I delete rows and multiple columns automatically?

  • Thread starter Thread starter Dazed and Confused
  • Start date Start date
D

Dazed and Confused

I generate spreadsheets monthly that require the exact same clean-up/editing
functions each time, such as deleting the first three rows, moving a
particular column to the end of the sheet and then deleting various and
multiple columns. Is there a way to program these editing functions so I do
not have to manually perform same ad infinitum and ad nauseum?

Any assistance would be greatly appreciated. Thank you.
 
Record what you want to do with the macro recorder and come back and post it.
We can help clean it up as needed.
 
On Sun, 1 Feb 2009 15:33:01 -0800, Dazed and Confused <Dazed and
I generate spreadsheets monthly that require the exact same clean-up/editing
functions each time, such as deleting the first three rows, moving a
particular column to the end of the sheet and then deleting various and
multiple columns. Is there a way to program these editing functions so I do
not have to manually perform same ad infinitum and ad nauseum?

Any assistance would be greatly appreciated. Thank you.

This is pretty simple once you get the hang of it. For instance,
removing the first three rows is just

Rows("1:3").delete

or to delete columns c & d,

Columns("c:d").Delete

To copy columns that are always the same, that's similarly easy. For
instance, to copy column A to C, this will work

Range("A:A").Copy Range("c1")

This copies the entire column A and pastes it in column C.

Try recording a macro and doing what needs to be done. That'll often
get you most of the way to what needs doing. Or post here again with
more details.

john
 

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