Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Delete row with criteria ?
Hi everyone. I have a col that contains many other value such as: A1 contain 0 A2 - 544 A3 -0 A4 - 100 A5 -0 A6 -53 A7 -0 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to Delete row with criteria ?
Starting with code I found here
http://www.angelfire.com/biz7/julian...ans_macros.htm First select the cells in the column Sub DelRowIfCriteria() Dim rng As Integer Dim i As Integer Dim cellCriteria As Integer cellCriteria = InputBox(prompt:="Enter criteria.") rng = Selection.Rows.Count ActiveCell.Offset(0, 0).Select Application.ScreenUpdating = False For i = 1 To rng If ActiveCell.Value = cellCriteria Then Selection.EntireRow.Delete Else ActiveCell.Offset(1, 0).Select End If Next i Application.ScreenUpdating = True End Sub vumian wrote: Hi everyone. I have a col that contains many other value such as: A1 contain 0 A2 - 544 A3 -0 A4 - 100 A5 -0 A6 -53 A7 -0 -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200607/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VLookup with criteria and delete row | Excel Discussion (Misc queries) | |||
Delete row if column criteria was met | Excel Programming | |||
Further help on delete criteria found | Excel Programming | |||
How do I delete a row from a spreadsheet if criteria is not met i. | Excel Worksheet Functions | |||
delete rows with criteria | Excel Programming |