Te anexo la macro para poner el promedio y la desviación:
Private Sub FiltrarDatos_Click()
'Por.Dante Amor
Application.ScreenUpdating = False
Set h1 = Sheets("Hoja1")
Set h2 = Sheets("Hoja2")
Set h3 = Sheets("VT")
Set h4 = Sheets("Filtro")
h4.Cells.Clear
If h1.AutoFilterMode Then h1.AutoFilterMode = False
If h2.AutoFilterMode Then h2.AutoFilterMode = False
If h3.AutoFilterMode Then h3.AutoFilterMode = False
u1 = h1.Range("B" & Rows.Count).End(xlUp).Row
u2 = h2.Range("G" & Rows.Count).End(xlUp).Row
h1.Range("A1:S" & u1).AutoFilter Field:=19, Criteria1:="<>"
h2.Range("A1:J" & u2).AutoFilter Field:=10, Criteria1:="<>"
h1.Range("B:B, G:G").Copy h4.[B1]
h2.Range("G:G").Copy h4.[D1]
h3.Range("A:A").Copy h4.[E1]
'
wmax = 0
For i = Columns("B").Column To Columns("E").Column
If h4.Cells(Rows.Count, i).End(xlUp).Row > wmax Then
wmax = h4.Cells(Rows.Count, i).End(xlUp).Row
End If
Next
'
If wmax > 31 Then f = 31 Else f = wmax
h4.Range("A" & wmax + 1) = "Promedio"
h4.Range("A" & wmax + 2) = "Desvio estándar"
With h4.Range("B" & wmax + 1 & ":E" & wmax + 1)
.FormulaR1C1 = "=ROUND(AVERAGE(R2C:R" & f & "C),1)"
End With
With h4.Range("B" & wmax + 2 & ":E" & wmax + 2)
.FormulaR1C1 = "=STDEV(R2C:R" & f & "C)"
End With
Application.ScreenUpdating = True
MsgBox "Datos filtrados y copiados", vbInformation
End Sub'S aludos. Dante Amor. Recuerda valorar la respuesta. G racias