Hello.
Sub RwData(rng As Range, col As Integer)
Dim Dn As Range
For Each Dn In rng
With Application
Dn.Offset(, -5) = .Max(Dn.Resize(, .CountA(Dn.Resize(, col)))) 'column H or 8 - is minus 5 from 13 or column M
Dn.Offset(, -3) = .Average(Dn.Resize(, .CountA(Dn.Resize(, col)))) 'this is...