Simple Question...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: tess457 (tess457.1bx3u1_at_excelforum-nospam.com)
Date: 09/01/04


Date: Wed, 1 Sep 2004 13:45:39 -0500

I need to search and filter an entire column in a database whose range
is continually changing by the day. What is the best way of searching
each cell in an entire column, and if the contents of the cell are now
what I am searching for, I want to delete the entire row? I am not sure
how to find the last row of data in the database, except by using the
"cntrl + *" function, and this selects the entire data range, so it
doesnt quite work. This is what I am curently using, but it doesnt seem
to filter through the complete file..i have to run the macro a few
times, and even then it deletes what it shouldnt.

Sub Filter()
Dim cel As Range, rng As Range
Set rng = Range("D2", Range("D50").End(xlUp))
For Each cel In rng
If cel.Value <> " " Then
cel.EntireRow.Delete
End If
Next cel

I would really appreciate anyones help or suggestions!! Thanks a ton...

Dustin

---
Message posted from http://www.ExcelForum.com/


Relevant Pages

  • RE: Database running over network runs extremely slow
    ... I have reports built into the database that track the entry ... you are searching (or using in your DLOOKUPs criteria parameter)? ... of the DLookups to looped recordset searches, ...
    (microsoft.public.access.tablesdbdesign)
  • Re: OO vs. RDB challenge
    ... > Layer 1. ... If you filter your data after you retrieve it, ... possible to redesign the database schema to enable SQL to do its job. ... A good RDBMS could integrate an external authentication server. ...
    (comp.object)
  • Re: Access module does not continue past the Filter Method
    ... If you get this problem in any database at all, ... the subroutine went back to not working again. ... Public Sub Apply_Tech_Filter ... Debug.Print "Past the Filter" ...
    (microsoft.public.access.modulesdaovba)
  • Re: Lots of Bits
    ... and performance is perhaps increased for the database. ... purist might frown upon it for more theoretical purposes as well as the many ... > match customer filter values with campaign filter values. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Access module does not continue past the Filter Method
    ... I have only seen the problem of "no runtime error messages" in this database. ... Public Sub Apply_Tech_Filter ... Debug.Print "Past the Filter" ...
    (microsoft.public.access.modulesdaovba)