Does anyone know why I get an error when I migrated this code over to a new worksheet from an old one, even though the tables remained the same size?
Dim x As Long, lastCell As Range, LR As Long, LC As Long, i As Integer, ColSum As Long, fc As Long
x = ActiveSheet.UsedRange.Columns.Count
i = 2
For i = 3 To LC
ColSum = (Cells(1, i).ColumnWidth + Cells(1, i - 1).ColumnWidth)
Next i
Set lastCell = Cells.SpecialCells(xlCellTypeLastCell).Offset(1, 0)
LR = lastCell.Row
Do Until Application.Count(Range(Cells(LR, 2), Cells(LR, 256))) <> 0
Set lastCell = lastCell.Offset(-1, 0)
LR = lastCell.Row
LC = lastCell.Column
Bookmarks