View Single Post
 
Old 11-05-2015, 11:11 AM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Assuming your data is on sheet1 and
assuming your data starts on row 2 and
assuming your data is in column A and
assuming your data always starts with an upper case letter
(now you know why to post a sample sheet)
something like this should work.
Test it on a copy of your sheet.

Code:
Sub test()
    Dim str As String
    Dim i As Long
    
Application.ScreenUpdating = False
With Sheets("Sheet1")
    For i = .Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
        With Cells(i, 1)
            str = .Value
            If Asc(Mid(str, 2, 1)) < 65 Or Asc(Mid(str, 2, 1)) > 90 Then
                Cells(i, 1).EntireRow.Delete
            End If
        End With
    Next i
End With
Application.ScreenUpdating = True
End Sub
Reply With Quote