Using Rows().Delete

H

Hafeez Esmail

How do I delete n rows after the row of the current cell?
Example:
current cell = A17
n = 3
How do I delete rows 18, 19 and 20?

This is what I have, but it's wrong...

rows(activecell.row + 1:activecell.row + intNum).delete
(xlshiftup)

Help Please
Hafeez Esmail
 
J

Jake Marx

Hi Hafeez,

Something like this would work:

ActiveCell.Offset(1, 0).Resize(3, 1).EntireRow.Delete shift:=xlUp

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 

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

Top