Filter words and delete rows (column header..
Closed
                                    
                        Lilly                    
                                    -
                            Nov 24, 2010 at 12:36 PM
                        
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Nov 25, 2010 at 09:47 AM
        TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Nov 25, 2010 at 09:47 AM
        Related:         
- Filter words and delete rows (column header..
 - How to delete column in word - Guide
 - Filter unknown senders android - Guide
 - Snapchat black and white filter - Guide
 - Delete my whatsapp account without app - Guide
 - Front panel audio header - Guide
 
1 response
                
        
                    TrowaD
    
        
                    Posts
            
                
            2921
                
                            Registration date
            Sunday September 12, 2010
                            Status
            Contributor
                            Last seen
            December 27, 2022
            
            
                    555
    
    
                    
Nov 25, 2010 at 09:47 AM
    Nov 25, 2010 at 09:47 AM
                        
                    Hi Lilly,
Try this code:
There are other structures for doing this, but I really like this one.
You can record a macro, apply filter, show only rows containing "stock" and then delete those rows, stop recording and take a look at the code excel created for you.
Best regards,
Trowa
            Try this code:
Sub test()
Set MR = Range("K2:K100")
    For Each cell In MR
If cell.Value = "stock" Then cell.EntireRow.Delete
    Next
End Sub
There are other structures for doing this, but I really like this one.
You can record a macro, apply filter, show only rows containing "stock" and then delete those rows, stop recording and take a look at the code excel created for you.
Best regards,
Trowa