Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 12-06-2017, 06:10 AM
Logit Logit is offline Automatically delete row based on keyword-VBA Windows 10 Automatically delete row based on keyword-VBA Office 2007
Expert
 
Join Date: Jan 2017
Posts: 591
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

.
Or maybe :

Code:
Option Explicit

Sub sbDelete_Rows_With_Specific_Data()
Dim lRow As Long
Dim iCntr As Long
Dim iCol As Long
iCol = 26   'add cols here
lRow = 20   'add rows here
For iCol = 1 To 26  'match last col number here with total cols above
    For iCntr = lRow To 1 Step -1
        If Cells(iCntr, iCol) = "loan" Or Cells(iCntr, iCol) = "financial" _
        Or Cells(iCntr, iCol) = "bank" Or Cells(iCntr, iCol) = "equity" Then ' You can change this text
            Rows(iCntr).Delete
        End If
    Next
Next
End Sub
Reply With Quote
 

Tags
excel vba, macros



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically delete row based on keyword-VBA How to delete automatically 500 “Heading 4” and all the contents in this from Navigation? liliaroma Word VBA 4 11-18-2017 07:53 PM
Automatically Delete Slides based on current time Pacman52 PowerPoint 2 07-16-2015 05:30 AM
How to Automatically Add/Delete Columns Based On Information kconnolly Excel 7 04-08-2014 07:23 AM
Find and Delete Rows based on a range damaniam Excel Programming 2 03-12-2014 06:06 AM
Automatically delete row based on keyword-VBA Find keyword in section & delete section donaldadams1951 Word VBA 5 12-03-2013 10:08 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft