Hi all! I have posted a solution to someone here http://www.ozgrid.com/forum/showthre...927#post318927 their question was can an entire row be deleted if the word in column A ended in "A"? so this is what i came up with:
[vba]
Sub letterremove()
Dim MyStr
Dim Rng As Range
Set Rng = Range("A1:A500")
On Error Resume Next
Set MyStr = Right(MyStr, 1)
For Each MyStr In Rng
MsgBox "Found " & MyStr
If LCase(Right(MyStr, 1)) = "a" Then
MyStr.Select
With Selection
.EntireRow.Delete
End With
End If
Next
End Sub
[/vba]as you can see its a loop and i thought that if the list in column a was 000's of rows long it would pretty much take forever!, also i had to use On Error Resume Next - i know its not desirable but its the only way i could combat this lineas of course this gave an error, i just couldnt think how to start at the top of the column working my way down finding words that ended in "a" and deleteing the row!Set MyStr = Right(MyStr, 1)
Anyone got some learning tips for me, suggestions or comments? if you do post back here i would like to post any solutions or suggetions to the other forum too!
Regards,
Simon