| フィルタで抽出したデータの数をカウントする |
|---|
サンプルマクロは、フィルタで抽出したデータ数をメッセージ
ボックスで表示します。
Sub Sample()
MsgBox Range(Range("A2"), _
Cells(Rows.Count, 1).End(xlUp)) _
.SpecialCells(xlCellTypeVisible).Count
'Excel95ではxlCellTypeVisibleに替えてxlVisibleを使用
End Sub
|
| Excel95/97/2000 |