Explanation

The COLUMNS function is fully automatic.

When you provide a range to COLUMNS, it will return a count of all columns in the range.

To count rows in a range, see theROWS function.

Excel formula: Total rows in range

Excel formula: Count cells in range

Excel COLUMNS function