Hi everyone,
I want to delete rows that have the text TRUE in column I, by using VBA. But I haven't figured it out. Is there any clues for this problem?
Thanks for your reading!
Hi everyone,
I want to delete rows that have the text TRUE in column I, by using VBA. But I haven't figured it out. Is there any clues for this problem?
Thanks for your reading!
Perhaps
![]()
Sub test() Dim LR As Long, i As Long LR = Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row For i = LR To 1 Step -1 If LCase(Range("I" & i).Value) = "TRUE" Then Rows(i).Delete Next i End Sub
Regards
Fotis.
-This is my Greek whisper to Europe.
--Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Advanced Excel Techniques: http://excelxor.com/
--KISS(Keep it simple Stupid)
--Bring them back.
---See about Acropolis of Athens.
--Visit Greece.
@Fotis1991: It doesn't work, but thanks for your reply
@JOHN H. DAVIS: I've tried it and it is great. Thanks for your help!
Maybe:
![]()
Sub mayaincaztec() Range("I1:I" & Range("I" & Rows.Count).End(3).Row).AutoFilter 1, "TRUE" Range("I2:I" & Range("I" & Rows.Count).End(3).Row).SpecialCells(12).EntireRow.Delete ActiveSheet.AutoFilterMode = False End Sub
You're welcome. Glad to help out and thanks for the feedback.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks