ExcelVBA@Workshop
HOME > Excel VBA サンプル集 > セル数、行数、列数を求める
セル数、行数、列数を求める

サンプルソース

Cells(1,1) = Cells.Count
' 結果:16777216

Cells(2,1) = Rows.Count
' 結果:65536

Cells(3,1) = Columns.Count
' 結果:256

解説

Cells.Countでセル数を取得します。
Rows.Countで行数を取得します。
Columns.Countで列数を取得します。


関連する内容



スポンサードリンク



Copyright (C) 2006-2008 ExcelVBA@Workshop All rights reserved.