Hi,
I am creating the macro for user to search some parts of characters and skip searching the same row if user click NO.
The formula below working improper after the last row found.
FoundRow = 0
For Each r In ws.Range("D5:D" & ws.Cells(Rows.Count, "D").End(xlUp).Row)
If r.Row > FoundRow Then
If FoundRow <> 0 Then
Set r = ws.Columns(4).Find(Me.TextBoxborrower.Value, Range("d5").Offset(FoundRow - 5), xlValues, xlPart)
Else
Set r = ws.Columns(4).Find(Me.TextBoxborrower.Value, Range("d5"), xlValues, xlPart)
End If
Else
GoTo nextCell
End If
If Len(r) >= 3 Then
If MsgBox("Is it the Borrower your are looking for ?" & vbLf & vbLf & _
r.Value, vbYesNo + vbQuestion, "Row Number = " & r.Row) = vbYes Then GoTo FillData
End If
nextCell: If r.Row >= FoundRow Then FoundRow = r.Row
Next r
Bookmarks