title: Efficient Lower Casing in Excel VBA
body: <p>Right now I use the below code to change an entire column to lower case.</p>
  
  <p>I was wondering if there is a more efficient way to do this - I have around 150K rows in my worksheet. </p>
  
  <p>It takes some time to complete and sometimes I get an <code>Out of Memory</code> error.</p>
  
  <p><strong>First Sub</strong></p>
  
  <pre><code>Sub DeletingFl()
  Dim ws1 As Worksheet
  Dim rng1 As Range
  Application.ScreenUpdating = False
  Set ws1 = Sheets("Raw Sheet")
  
  ws1.AutoFilterMode = False
  Set rng1 = ws1.Range(ws1.[a1], ws1.Cells(Rows.Count, "A").End(xlUp))
  rng1.AutoFilter 1, "Florida"
      If rng1.SpecialCells(xlCellTypeVisible).Count &gt; 1 Then
      Set rng1 = rng1.Offset(1, 0).Resize(rng1.Rows.Count - 1)
      rng1.EntireRow.Delete
      End If
  ws1.AutoFilterMode = False    
  Call DeletingEC
  End Sub
  
  Sub DeletingEC()
  Dim ws1 As Worksheet    
  Dim rng1 As Range
  Application.ScreenUpdating = False
  Set ws1 = Sheets("Raw Sheet")
  
  ws1.AutoFilterMode = False
  Set rng1 = ws1.Range(ws1.[a1], ws1.Cells(Rows.Count, "A").End(xlUp))
  rng1.AutoFilter 1, "East Coast"
  If rng1.SpecialCells(xlCellTypeVisible).Count &gt; 1 Then
      Set rng1 = rng1.Offset(1, 0).Resize(rng1.Rows.Count - 1)
      rng1.EntireRow.Delete
  End If
  ws1.AutoFilterMode = False
  Worksheets("Raw Sheet").Activate    
  Call Concatenating
  End Sub
  </code></pre>
  
  <p><strong>Second Sub</strong></p>
  
  <pre><code>Sub Concatenating()
  
  Columns(1).EntireColumn.Insert
  Columns(2).EntireColumn.Copy Destination:=ActiveSheet.Cells(1, 1)
  
  Dim lngLastRow As Long
  lngLastRow = Cells(Rows.Count, "A").End(xlUp).Row
  
      Range("A2:A" &amp; lngLastRow).Formula = "=F2 &amp; ""_"" &amp; G2"
  Range("A1").Select
      ActiveCell.FormulaR1C1 = "Title"       
  Call LowerCasing
  End Sub
  
  Sub Lowercasing()
  Dim myArr, LR As Long, i As Long
         LR = Range("A" &amp; Rows.Count).End(xlUp).Row
  myArr = Range("A1:A" &amp; LR)
         For i = 1 To UBound(myArr)
                myArr(i, 1) = LCase(myArr(i, 1))
         Next i
  Range("A1:A" &amp; LR).Value = myArr
  Set ExcelSheet = Nothing
  End Sub
  </code></pre>