Results 1 to 7 of 7

Would like to delete rows based on cell content

Threaded View

cindywylie Would like to delete rows... 02-27-2014, 10:49 AM
AlphaFrog Re: Would like to delete rows... 02-27-2014, 11:20 AM
cindywylie Re: Would like to delete rows... 02-27-2014, 11:42 AM
AlphaFrog Re: Would like to delete rows... 02-27-2014, 12:10 PM
cindywylie Re: Would like to delete rows... 02-27-2014, 12:32 PM
AlphaFrog Re: Would like to delete rows... 02-27-2014, 01:07 PM
cindywylie Re: Would like to delete rows... 02-27-2014, 01:14 PM
  1. #1
    Registered User
    Join Date
    08-15-2012
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Would like to delete rows based on cell content

    Good Morning All,

    The attached sample spreadsheet is divided into two sections. The top section is regular sales orders and the bottom section is non regular sales orders. I'm currently using the code below to delete rows based on color of column A. I would like to modify the current code to delete rows based on column A for regular sales orders only and to delete non regular sales orders based on SO status in column Q. Any non regular sales order with a SO status in column Q of A or S should be deleted with the macro. Any help is appreciated.

    Sub deleteRowOnCollor()
        Dim lLR, lC As Long
        Application.ScreenUpdating = False
        lLR = Sheets(1).Range("A" & Rows.Count).End(xlUp).Row 'Determine last row
        For lC = lLR To 3 Step -1
            Sheets(1).Cells(lC, 1).Activate
            If ActiveCell.Interior.Color = 15773696 Then 'Used index color.
                Rows(lC).Delete Shift:=xlUp 'delete row
            End If
        Next
        Application.ScreenUpdating = True
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Find rows to delete with a macro based on cell content
    By mkraffert in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-28-2013, 06:27 PM
  2. delete certain rows based on their partial cell content
    By WasWodge in forum Excel General
    Replies: 3
    Last Post: 01-30-2011, 02:37 PM
  3. Delete rows based on cell content
    By scaffdog845 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 05-06-2010, 07:34 PM
  4. Need help to delete rows based on cell content
    By iturnrocks in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2008, 12:10 PM
  5. Replies: 2
    Last Post: 10-03-2005, 10:05 AM

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