A slightly different (reusable) approach which will summarize multiple columns and return the results in an array:
Sub Tester()
Dim summ
'get column averages based on key in column index 3
summ = Summary([B3:G18], 3, Array(1, 2, 4, 5, 6))
[I3].Resize(UBound(summ, 1), UBound(summ, 2)).Value = summ
End Sub
'For data in range `rngIn`, average numeric values in columns within `arrValueCols`,
' grouping by the value in column `keyCol`, and return the result as a 2D 1-based array
Function Summary(rngIn As Range, keyCol As Long, arrValueCols)
Dim data, dict As Object, k, r As Long, arrOut, indx As Long, c As Long, tmp, v
Dim numKeys
numKeys = UBound(Application.Unique(rngIn.Columns(keyCol))) '# of unique keys
data = rngIn.Value 'get data as array
ReDim arrOut(1 To numKeys, 1 To UBound(arrValueCols) + 2) 'size return array
Set dict = CreateObject("Scripting.Dictionary")
For r = 1 To UBound(data, 1)
k = data(r, keyCol)
If Not dict.exists(k) Then 'new key?
indx = indx + 1
dict.Add k, indx
arrOut(indx, 1) = k 'populate the key in the return array
End If
For c = 0 To UBound(arrValueCols) 'loop over the columns to be summarized
v = data(r, arrValueCols(c))
If Len(v) > 0 And IsNumeric(v) Then 'any value to process?
tmp = arrOut(dict(k), c + 2) 'extract the array
If IsEmpty(tmp) Then tmp = Array(0, 0) 'no array yet ? Create it...
tmp(0) = tmp(0) + v
tmp(1) = tmp(1) + 1
arrOut(dict(k), c + 2) = tmp 'return the array
End If
Next c
Next r
For Each k In dict 'calculate the averages
For c = 0 To UBound(arrValueCols)
tmp = arrOut(dict(k), c + 2)
If Not IsEmpty(tmp) Then arrOut(dict(k), c + 2) = tmp(0) / tmp(1)
Next c
Next k
Summary = arrOut
End Function
Example:

EDIT: a version which adds the ability to specify multiple "key" columns:
Sub Tester2()
Dim summ
summ = Summary([B2].CurrentRegion, Array(3, 5), Array(1, 2, 4, 6, 7))
[K2].Resize(UBound(summ, 1), UBound(summ, 2)).Value = summ
End Sub
'For data in range `rngIn`, average numeric values in columns within `arrValueCols`,
' grouping by the value(s) in columns within `arrKeyCols`,
' and return the result as a 2D 1-based array.
' If `hasHeaders` is true, return the headers from the input range as the first row
Function Summary(rngIn As Range, arrKeyCols, arrValueCols, Optional hasHeaders As Boolean = True)
Const SEP_STR As String = "<|>"
Dim data, dict As Object, k, r As Long, nr As Long, arrOut, indx As Long, c As Long, tmp, v
Dim numKeys, numKeyCols As Long, numValueCols As Long, arrKeys, sep, el, arr, colPos As Long
Dim rStart As Long
numKeyCols = ArraySize(arrKeyCols)
numValueCols = ArraySize(arrValueCols)
rStart = IIf(hasHeaders, 2, 1)
data = rngIn.Value 'get data as array
nr = UBound(data, 1) '# of rows
Set dict = CreateObject("Scripting.Dictionary")
ReDim arrKeys(1 To nr) 'for storing each row's key
'start by building the row keys and collecting the unique key values
'## decide here how you want to handle empty key values ##
indx = IIf(hasHeaders, 1, 0) 'adjust for headers
For r = rStart To nr
k = ""
sep = ""
For Each el In arrKeyCols 'build the key for this row
k = k & sep & data(r, el)
sep = SEP_STR
Next el
arrKeys(r) = k 'store the row key
If Not dict.exists(k) Then '...add key to dict if new key
indx = indx + 1
dict.Add k, indx 'relate key to row of output array
End If
Next r
ReDim arrOut(1 To dict.Count + IIf(hasHeaders, 1, 0), _
1 To numKeyCols + numValueCols) 'size return array
If hasHeaders Then 'need to fill the headers in the output?
c = 1
For Each arr In Array(arrKeyCols, arrValueCols)
For Each el In arr
arrOut(1, c) = data(1, el)
c = c + 1
Next el
Next arr
End If
'fill key columns in output array
For Each k In dict
arr = Split(k, SEP_STR)
c = 1
For Each el In arr
arrOut(dict(k), c) = el
c = c + 1
Next el
Next k
'first collect the data in the output array...
For r = rStart To nr
k = arrKeys(r) 'get the stored key
For c = 0 To UBound(arrValueCols) 'loop over the columns to be summarized
colPos = c + numKeyCols + 1 'column in the output array
v = data(r, arrValueCols(c))
If Len(v) > 0 And IsNumeric(v) Then 'any value to process?
tmp = arrOut(dict(k), colPos) 'extract the array
If IsEmpty(tmp) Then tmp = Array(0, 0) 'no array yet ? Create it...
tmp(0) = tmp(0) + v 'add value to total
tmp(1) = tmp(1) + 1 'increment the count
arrOut(dict(k), colPos) = tmp 'return the array
End If
Next c
Next r
'...then calculate the averages
For Each k In dict
For c = 0 To UBound(arrValueCols)
colPos = c + numKeyCols + 1
tmp = arrOut(dict(k), colPos)
If Not IsEmpty(tmp) Then arrOut(dict(k), colPos) = tmp(0) / tmp(1)
Next c
Next k
Summary = arrOut
End Function
Function ArraySize(arr) As Long
ArraySize = 1 + (UBound(arr) - LBound(arr))
End Function
dict.RemoveAll?