My code seems to stop executing beyond a particular line with no errors. : I haven't used any break statement but my code isn't executing beyond a line. I am using the same loop in a different way 5 times in the same code with each loop running more than 1000 times. Could this be a reason?  

 `  ActiveCell.FormulaR1C1 = "1 Month"   
'The above line executes but beyond this things are working  
      i = x
    j = x
    Dim t3 As Date, t4 As Date, temp As Integer
    Dim r As Single
    temp = 0
     Do Until temp = 1
              t1 = "=DAY(dt(j))"
              t2 = "=DAY(dt(i))"
              t3 = "=MONTH(dt(j))"
              t4 = "=MONTH(dt(i))"
             If (t2 < t1) Then                ' condition 1
                If (t3 <> t4) Then            ' condition 2     
               upf(0) = "=COUNTIF(chp(i-1):chp(j),"">0"")" 'counting +ve numbers
              dwf(0) = "=COUNTIF(chp(i-1):chp(j),""<0"")"  'counting -ve numbers
                upb(0) = "=COUNTIF(chb(i-1):chb(j),"">0"")"
              dwb(0) = "=COUNTIF(chb(i-1):chb(j),""<0"")"
                std(0) = "=STDEV(price(i-1):price(j))"    'standard deviation
                sdb(0) = "=STDEV(bch(i-1):bch(j))"
     mx = "=MAX(price(i-1):price(j))"
     mn = "=MIN(price(i-1):price(j))"
     ActiveCell.FormulaR1C1 = mn / mx - 1  'calculating maximum drawdown
     ActiveCell.Offset(0, 1).Select
     mx = "=MAX(bch(i-1):bch(j))"
     mn = "=MIN(bch(i-1):bch(j))"
     ActiveCell.FormulaR1C1 = mn / mx - 1
     temp = 1
     End If
     End If
     Loop`                               'end  loop