Macro to select 4 entire rows and then delete rows

  • Thread starter Thread starter Scott Viney
  • Start date Start date
S

Scott Viney

Afternoon All,

Ive never written a macro before. So excuse me if this is dead simple.

With VBA how can I create a macro that when I select an entire row with the
mouse then run the macro. It selects the next 3 entire rows below then,
deletes these rows.

Any help will be appreciated,
Scott V
 
Hi Scott

This example will delete the activecell row and 3 rows below it

Cells(ActiveCell.Row, 1).Resize(4, 1).EntireRow.Delete
 
Thanks JE,

If I wanted it to say start a specific entire row, then from there delete 4
entire rows. Then move down a fixed number of rows then do the same thing
till it run out of data how would I go about this.

Scott
 

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