title: Poor performance of the excel macro
body: <p>I made a macro in vb for excel and its working but the problem is that for 40000 rows it works very slow (about 2 min on c2d e7500@2,9 GHz). I think that it can be done faster but I don't know how:) Someone help me?</p>
  
  <pre><code>Dim bufor As String
  Dim condition As Boolean
  
      Cells.Find(What:="Month", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
      xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
      , SearchFormat:=False).Activate
  
      ActiveCell.Offset(1, 0).Range("A1").Select
      ActiveCell.Select
  
      Do While condition = False
      bufor = Right(ActiveCell.Value, 1)
  
  
          If bufor = "1" Then
          ActiveCell.Value = "January"
          ElseIf bufor = "2" Then
          ActiveCell.Value = "February"
          ElseIf bufor = "3" Then
          ActiveCell.Value = "March"
          ElseIf bufor = "4" Then
          ActiveCell.Value = "April"
          ElseIf bufor = "5" Then
          ActiveCell.Value = "May"
          ElseIf bufor = "6" Then
          ActiveCell.Value = "June"
          ElseIf bufor = "7" Then
          ActiveCell.Value = "July"
          ElseIf bufor = "8" Then
         ActiveCell.Value = "August"
         ElseIf bufor = "9" Then
         ActiveCell.Value = "September"
         ElseIf bufor = "10" Then
         ActiveCell.Value = "October"
         ElseIf bufor = "11" Then
         ActiveCell.Value = "November"
       ElseIf bufor = "12" Then
       ActiveCell.Value = "December"
      End If
  
  
  
       ActiveCell.Offset(1, 0).Range("A1").Select
       ActiveCell.Select
  
  
      If ActiveCell.Value = "" Then 
      condition = True
      End If
  
      Loop
  </code></pre>