04 CountGroup - AndrewMB2/Logic-Architect-for-Excel-VBA GitHub Wiki

CountGroup method

Counts the adjacent cells in the given column with the same value as the cell represented by the given row.

Applies to

TableData ArrData RsetData Xdata XShared

Parameters

Name Type Description
Field Variant Field name or field number.
Row Long First row of the group.

CountGroup counts all adjacent cells in the field/column identifies by Field, starting with the row Row, and returns the number of cells found. It returns 0 if Row is 0 or there is no data.

CountGroup can be used in conjunction with Find to locate a set of identical values in a column.