Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default How to delete rows in visual basic

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!


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 461
Default How to delete rows in visual basic

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

"Ruben" wrote:

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!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default How to delete rows in visual basic

What was wrong with the previous suggestion?

--
__________________________________
HTH

Bob

"Ruben" wrote in message
...
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!




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default How to delete rows in visual basic

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


"Bob Phillips" wrote:

What was wrong with the previous suggestion?

--
__________________________________
HTH

Bob

"Ruben" wrote in message
...
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!





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data filter and deleting rows in visual basic Ruben Excel Discussion (Misc queries) 0 August 24th 08 08:38 PM
How to delete rows in visual basic Ruben Excel Discussion (Misc queries) 3 August 20th 08 03:50 PM
Visual Basic Co-op 20 Excel Discussion (Misc queries) 2 June 28th 07 09:06 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
Visual Basic Help Duncan Smith Excel Discussion (Misc queries) 1 December 3rd 04 09:13 AM


All times are GMT +1. The time now is 07:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"