Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Gentlemen,
Actually, here is a routine I have that works great to delete all row where the word "Posted" is not found in cell "B" of a row. All needed to do was tweak this so that is would not look at cell "A" of row, determine if the value in cell "A" is a number and delete the ro if it is not. I know that I would need to change the range to "A1" but do not kno what I have to do with the 'If ActiveCell = "Posted" Then' text t get it to look at the numeric cell attribute of the activecell. Worksheets("sheet1").Activate Range("B1").Select Counter = InputBox("Enter the total number of rows to process") For i = 1 To Counter If ActiveCell = "Posted" Then ActiveCell.Offset(1, 0).Select Selection.EntireRow.Delete Counter = Counter - 1 Else Selection.EntireRow.Delete End If Next i Thanks, Mik -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
deleting rows in a worksheet if condition is met | Excel Discussion (Misc queries) | |||
Line Break in Cell Number Format | Excel Discussion (Misc queries) | |||
deleting condition after the first duplicate | Excel Worksheet Functions | |||
how 2 Count number of cells that have specific condition format? | Excel Worksheet Functions | |||
Deleting conditional formats based on condition | Excel Programming |