Please try this.
Sub ActivateNextBlank()
Dim rngOfInterest As Range, rngOfBlanks As Range, cell As Range
Dim LastRow As Long
Dim blnFound As Boolean, blnEnd As Boolean
Dim sMsg As String
Static rngLastFoundBlank As Range
LastRow = Cells(Rows.Count, "D").End(xlUp).Row
sMsg = ""
If rngLastFoundBlank Is Nothing Then
Set rngOfInterest = Range("BP9:BP" & LastRow)
Else
Set rngOfInterest = Range("BP" & rngLastFoundBlank.Row + 1 & ":BP" & LastRow)
End If
On Error Resume Next
If rngOfInterest.Cells.Count = 1 Then
If rngOfInterest.Value = "" Then
Set rngOfBlanks = rngOfInterest
Else
Set rngOfBlanks = Nothing
End If
Else
Set rngOfBlanks = rngOfInterest.SpecialCells(xlCellTypeBlanks)
End If
On Error GoTo 0
If Not rngOfBlanks Is Nothing Then
For Each cell In rngOfBlanks.Cells
If cell.Offset(0, -1).Value <> "" And IsNumeric(cell.Offset(0, -1).Value) Then
cell.Activate
Set rngLastFoundBlank = cell
blnFound = True
Exit For
End If
Next
On Error Resume Next
If Not blnFound Or rngLastFoundBlank.Row + 1 > LastRow Then
Set rngLastFoundBlank = Nothing
blnEnd = True
End If
On Error GoTo 0
Else
Set rngLastFoundBlank = Nothing
blnEnd = True
End If
If blnEnd Then MsgBox ("No more unrecon")
End Sub
Bookmarks