Deleting Rows In Excel Using VBA

J

Jeffrey

In a worksheet I have a range encompassing approximately
20,000 rows and 100 columns. I need a way to delete all
rows having a particular value in column A. In my
application a user will determine this particular value
using a combo box on a form. The combo box row source is
column A. As a result of doing some on-line research I
have found a few solutions, but they all seem to involve
looping through all of the rows in the specified range.
Isn't there a better way using a filter or some kind of
database function?

Thanks.
 
R

Rod Gill

Hi,

Try using Data, Autofilter then filtering for the rows you want to delete.
Delete them then remove filtering. That works manually in Excel XP for me so
it should work using VBA as well.

--
Rod Gill
Project MVP
For Microsoft Project companion projects, best practices and Project VBA
development services
visit www.projectlearning.com/
 

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