Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel General
Delete rows that the first cell's text is "A"
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Norman Jones, post: 1169770"] Hi Greg, Try: '==============>> Public Sub Tester() Dim rng As Range Dim rcell As Range Dim delRng As Range Dim WB As Workbook Dim SH As Worksheet Dim arr As Variant Dim CalcMode As Long Set WB = ActiveWorkbook '<<===== CHANGE Set SH = WB.Sheets("Sheet1") '<<===== CHANGE Set rng = SH.Columns(1) arr = Array("A", "D", "G", "H") '<<===== CHANGE With Application CalcMode = .Calculation .Calculation = xlCalculationManual .ScreenUpdating = False End With For Each rcell In rng.Cells If Not IsError(Application.Match(rcell.Value, arr, 0)) Then If delRng Is Nothing Then Set delRng = rcell Else Set delRng = Union(rcell, delRng) End If End If Next rcell If Not delRng Is Nothing Then delRng.EntireRow.Delete End If With Application .Calculation = CalcMode .ScreenUpdating = True End With End Sub '<<============== Change the Sheet name and the networkletters letters to suit your requirements. [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel General
Delete rows that the first cell's text is "A"
Top