ホーム :関数 :


subtotal関数

前へ 次へ

j = Range("B5").CurrentRegion.Rows.Count + 4 ' データの最終行番号
jj = Range("b5").CurrentRegion.Columns.Count + 1 'データの列数+1
If j > 4 Then
For i = retu To jj - 1 ' 列数の数分、vlookup関数を貼り付ける。
Cells(2, i).Select
ActiveCell.FormulaR1C1 = "=SUBTOTAL(9,R[4]C:R[" & j - 2 & "]C)"
Cells(2, i).Select
Next
End If

前へ 次へ
関数 に戻る