Hi,

I'm using a function to get the row number of cell containing specific text :

Private Sub copyMaintenance(activequoteSheet As Worksheet,  cellRow As Integer, cellCol As Integer)

    Dim upperBound As Integer
   
    For cellRow = cellRow To cellRow - 10 Step -1     'cellRow = 49 and cellRow - 10 = 39
        If activequoteSheet.Cells(cellRow, cellCol).Value = "Bob" Or _
           activequoteSheet.Cells(cellRow, cellCol).Value = "Jane" Or _
           activequoteSheet.Cells(cellRow, cellCol).Value = "Tom" Then
            upperBound = activequoteSheet.Cells(cellRow, cellCol).Row
            Debug.Print upperBound 'This is printing "43" in an infinite loop
            'More code goes here
            Exit For
        End If
    Next cellRow

End Sub
Any ideas why ?

Thanks,
amphi