How to delete rows in visual basic

R

Ruben

Hello,
I would like to delete rows for a specific criteria in visual basic, but I
don't know how. I have filtered my data, and now I would like to delete the
data that did not pass the filter. Thanks for helping!
 
A

akphidelt

I think its the EntireRow.Delete that you can use

So you can loop through your data, and any criteria that doesn't match put

Range("WhateverCell").EntireRow.Delete
 
R

Ruben

Bob,

Sorry for my very late reaction. I used your first suggestion for
autofiltering and deleting the rows, which works well. I think I have posted
the question twice, so there was nothing wrong with your first post. Thank
you very much for helping me!

Ruben
 

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