Navigation: FXLV4SpeedTools > Information Functions >

Functions for counting Rows and Columns

 

 

 

Functions for counting Rows and Columns

These functions give you the ability to find the number of rows or columns to the last empty cell, the next empty cell, or the last cell in the used range:

COUNTROWS2 and COUNTCOLS2 count the number of rows or columns from a referenced cell to the last visible non-empty cell in the row or column.

COUNTCONTIGROWS2 and COUNTCONTIGCOLS2 count the number of rows or columns from a referenced cell to before the next visible empty cell.

COUNTUSEDROWS2 and COUNTUSEDCOLS2 count the number of rows or columns from a referenced cell to the last cell in the used range.

You can use these functions in Dynamic Range names and for the number of rows and columns arguments in OFFSET.

COUNTROWS2 and COUNTCONTIGROWS2 can count rows in either a single column or multiple adjacent columns.

Similarly, COUNTCOLS2 and COUNTCONTIGCOLS2 can count columns in either a single row or multiple adjacent rows.

All these functions (COUNTROWS2, COUNTCOLS2, COUNTCONTIGROWS2, COUNTCONTIGCOLS2, COUNTUSEDROWS2 and COUNTUSEDCOLS2) are volatile functions.

Changing cell visibility using Automatic or Advanced filter will trigger a recalculation of COUNTROWS2, COUNTCOLS2, COUNTCONTIGROWS2 and COUNTCONTIGCOLS2.

Changing cell visibility using Hide, Unhide or by setting width or height to zero will NOT trigger a recalculation of COUNTROWS2, COUNTCOLS2, COUNTCONTIGROWS2 and COUNTCONTIGCOLS2.

These functions are volatile, NOT thread-safe, NOT array-capable functions.

 

 

 

Copyright © 2023 Decision Models Ltd