РЕДАКТИРОВАТЬ: Обновление для несмежных таблиц.
Это предполагает, что у вас нет ничего ниже или справа от таблицы на листе, и что ваша таблица начинается с B13 (заголовки будут строки 12):
Option Explicit
Public Sub BuildStatsTable()
Dim lngMaxRow As Long
Dim lngMaxCol As Long
Dim lngCol As Long
Dim strRng As String
Dim rngLastUsed As Range
Set rngLastUsed = GetLastRange(Cells(13, 2))
lngMaxCol = rngLastUsed.Column
lngMaxRow = rngLastUsed.Row
For lngCol = 2 To lngMaxCol
strRng = "R13C" & lngCol & ":R" & lngMaxRow & "C" & lngCol
Cells(lngMaxRow + 2, lngCol).FormulaR1C1 = "=IF(COUNT(" & strRng & ")=0,"""",SUM(" & strRng & "))"
Cells(lngMaxRow + 3, lngCol).FormulaR1C1 = "=IF(COUNT(" & strRng & ")=0,"""",MIN(" & strRng & "))"
Cells(lngMaxRow + 4, lngCol).FormulaR1C1 = "=IF(COUNT(" & strRng & ")=0,"""",MAX(" & strRng & "))"
Cells(lngMaxRow + 5, lngCol).FormulaR1C1 = "=IF(COUNT(" & strRng & ")=0,"""",AVERAGE(" & strRng & "))"
Next lngCol
End Sub
Private Function GetLastRange(rngTopLeft As Range) As Range
Dim rngUsed As Range
Dim lngMaxRow As Long
Dim lngMaxCol As Long
Set rngUsed = Range(rngTopLeft, rngTopLeft.SpecialCells(xlCellTypeLastCell))
lngMaxRow = rngUsed.Find(What:="*", _
After:=rngUsed.Cells(1), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
lngMaxCol = rngUsed.Find(What:="*", _
After:=rngUsed.Cells(1), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Column
Set GetLastRange = Cells(lngMaxRow, lngMaxCol)
End Function