delete rows w/o hardcoding numbers

D

Dave B

I'd like to delete a group of rows. Normally I would do:

Rows("12:45").Delete Shift:=xlUp

But the row numbers are stored in variables. I can't do (causes an
error):

Rows("intBeginDelete:intEndDelete").Delete Shift:=xlUp

I can do it using a For...Next loop, deleting the rows one at a time,
but I'm working with lots of row groups & files and that makes
execution slow. Is there an easier/faster way to do this?
 

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