How to delete rows in visual basic

  • Thread starter Thread starter Ruben
  • Start date Start date
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!
 
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
 
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
 
Back
Top