Never use Excelformulae in VBA
Never use UDF's in VBA
Do all the calculation in arrays
Sub Block_date_Start_Date() sn = Sheet2.Cells(58, 1).CurrentRegion.Resize(, 156) For j = 3 To UBound(sn) If sn(j, 32) >= 0 Then For jj = 51 To UBound(sn, 2) If sn(j, jj) > 0 Then Exit For Next sn(j, 43) = sn(1, jj) End If Next .... End Sub