Results 1 to 2 of 2

Review Macro Needed

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Review Macro Needed

    If I have this formula:
    <code>
    Sub dogsaver()
    Dim lastrow As Long
    Dim rowcount As Long
    With Sheet1
    lastrow = .Cells.Find("*", .Cells(.Rows.Count, .Columns.Count), SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    For rowcount = 2 To lastrow
    If .Cells(rowcount, 4).Value Like "*T-SHIRT*" Then
    Else
    .Cells(rowcount, 4).ClearContents
    End If
    Next rowcount
    End With
    End Sub
    </code>
    This will remove everything except t-shirts. it clears the cells that does not contain T-Shirt. How can I reverse this and find Jeans and clear all the cells completely that contain that word. Unless there is another way besides using the macro
    Last edited by davesexcel; 07-14-2010 at 08:56 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