I'm using the following code to attempt to dynamically copy a list to another worksheet. It runs, but instead of copying, it just deletes all of column E on the source worksheet, and doesn't move anything to the destination worksheet. I'm not sure what's going on, any suggestions?
Option Explicit
Sub findCells()
Dim topCell As String
Dim leftCell As String
Dim refCell As Range
Dim sht As Worksheet
Dim lastRow As Long
Dim i As Long
Set refCell = ActiveCell
topCell = refCell.End(xlUp).Value
leftCell = refCell.End(xlToLeft).Value
MsgBox topCell
MsgBox leftCell
Worksheets(topCell).Activate
Set sht = Worksheets(topCell)
lastRow = sht.Cells(sht.Rows.Count, "A").End(xlUp).Row
MsgBox lastRow
For i = 1 To lastRow
Dim cellVal As String
Dim altCounter As Integer
altCounter = 31
Cells(i, 5).Value = cellVal
If leftCell = cellVal Then
Dim crange As Range
altCounter = altCounter + 1
Let crange = "A" & i & ":" & "G" & i
Range(crange).Copy Worksheets("Summary").Range("A" & altCounter & ":" & "G" & altCounter)
End If
Next i
End Sub