Macro for deleting a row with specific criteria in a cell
Closed
MacroNovice
Posts
2
Registration date
Tuesday June 18, 2013
Status
Member
Last seen
June 25, 2013
-
Jun 18, 2013 at 06:13 PM
Blocked Profile - Jun 26, 2013 at 09:08 AM
Blocked Profile - Jun 26, 2013 at 09:08 AM
Related:
- Macro for deleting a row with specific criteria in a cell
- How do i find a specific video on youtube - Guide
- How to delete a row in a table in word - Guide
- Saints row 2 cheats - Guide
- How to run a macro in excel - Guide
- The following excel image has a vba program (see below). what will be the result after the program is executed? any cells not displayed are currently empty, and any cells with numbers are formatted numeric. sub afdo a=0 lastrow = cels(rows. count, 1). end(xdup). row for i =14 to lastrow step 2 a=a cellsii. 5) value next cells(lastrow 2, 1) value = "the sum - Guide
2 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jun 19, 2013 at 09:25 PM
Jun 19, 2013 at 09:25 PM
when you write a macro for deleting rows you loop from last row to first row and not reverse . rewrite macro
Good Morning.
If you just want to do as the previous poster had mentioned change the following lines in your macro:
MyCol = InputBox("Column to evaluate?", "Column Search", "FG")
MyVal = InputBox("Value to look for", "search value", 1)
For i = Range(MyCol & "65536").End(xlUp).Row to 1 Step -1
If Application.WorksheetFunction.CountIf(Range("A" & i & ":FZ" & i), MyVal) > 0 Then
Range("A" & i).EntireRow.Delete
End If
Hope this gets you closer.
If you just want to do as the previous poster had mentioned change the following lines in your macro:
MyCol = InputBox("Column to evaluate?", "Column Search", "FG")
MyVal = InputBox("Value to look for", "search value", 1)
For i = Range(MyCol & "65536").End(xlUp).Row to 1 Step -1
If Application.WorksheetFunction.CountIf(Range("A" & i & ":FZ" & i), MyVal) > 0 Then
Range("A" & i).EntireRow.Delete
End If
Hope this gets you closer.
Jun 25, 2013 at 12:07 PM