Results 1 to 19 of 19

Find and delete range of data

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-03-2009
    Location
    USA, California
    MS-Off Ver
    Excel 2007
    Posts
    385

    Find and delete range of data

    What I need is some code that will do the below code for a range of data with each new search searching the next cell, first pass the if statement checks O5 and then runs the search on N5 to delete the data. The second pass would then check O6 and run the search on N6. The range that would need to be searched and purged would be O2:O750. If anyone has any ideas on how to do this differently I'm open to suggestions, but at the very least if someone could help with what I ask even if it isn't the most effective.

    If Range("O5").Value = 1 Then
        Columns("A:J").Select
        Selection.Replace What:=Range("N5"), Replacement:="", LookAt:=xlPart, _
            SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
            ReplaceFormat:=False
    End If
    Last edited by randell.graybill; 03-18-2010 at 08:40 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1