endless loop

C

caricc

Can someone help I have gotten caught in an endless loop with the following
code:

Dim rngTarget As Range
Dim rngFound As Range
Dim intPasteRow As Integer

Set rngTarget = Sheets("PC Except Report Work").Cells
intPasteRow = Sheets("Final Docs
Report").Cells.SpecialCells(xlCellTypeLastCell).Row + 1

Set rngFound = rngTarget.Find("Final")

If Not rngFound Is Nothing Then

Do
rngFound.EntireRow.Copy Destination:=Sheets("Final Docs
Report").Cells(intPasteRow, 1)
intPasteRow = intPasteRow + 1
rngFound.EntireRow.Delete
Set rngFound = rngTarget.Find("Final")
Loop Until rngFound Is Nothing

In the Do section I just want to copy a row if a unique number called Loan
number does not exist on the final docs ws. I do not want teh delete. but if
I remove the delete it is caught in an endless loop.

Any help.

Thanks in advance.
 
C

caricc

its not endleesly looping just so much data to process. what i need help with
is how to get it to chekc ws: pc except preport work loan numers with loan
numbers from ws:final docs report. if it doesn't exist on the ws: final docs
report it is to allow it to copy to the required ws.
 
B

Bob I

Perhaps if the system takes an excruciatingly long time to perform the
operation, you are using the wrong method of record storage? It sounds
to me like a database would be more appropriate.
 
Top