Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In the following code, Im tying to go down the Combined worksheets
columns cells locating the values of the cell in the worksheet VoidReq & delete that sheets row if found, continuing down the Combined worksheets columns cell until it runs into empty cell. The problem is sometimes it will not find the value on the Combined sheet & I want it to skip over deleting a row & continue on down the column until it gets to the empty cell at the bottom. I have an error catch Error GoTo FindAgain but in running the code it seems to only skip over one not found entry & when it runs into another not found entry it craps out. I know the code is I have is probably sloppy & I apologize but Im still a struggling learner Do While Not IsEmpty(ActiveCell) If IsEmpty(ActiveCell) Then Exit Do Else Vfind = ActiveCell.Value Sheets("Combined").Select On Error GoTo FindAgain Cells.Find(What:=Vfind, After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate ActiveCell.Rows("1:1").EntireRow.Select Selection.Delete Shift:=xlUp FindAgain: Sheets("VoidReq").Select ActiveCell.Offset(1, 0).Range("A1").Select End If Loop |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
On Error Resume Next (when next statement is Do Loop ...) | Excel Discussion (Misc queries) | |||
how to put a loop in a macro? | New Users to Excel | |||
Loop time seems dependent on unrelated workbook - Why? | Excel Worksheet Functions | |||
Loop gone crazy | Excel Discussion (Misc queries) | |||
Do Loop | Excel Discussion (Misc queries) |