Total columns in range

Generic formula 

=COLUMNS(rng)

Related formulas 

Total rows in range

Total cells in a range

Explanation

If you need to count the number of columns in a range, use the COLUMNS function. In the generic form of the formula (above) rng represents a range of cells.

In the example, the active cell contains this formula:

=COLUMNS(B4:C9)

Here's how the formula works:

COLUMNS counts the number of columns in and returns the result as a number.

Total columns in range

Generic formula 

=COLUMNS(rng)

Related formulas 

Total rows in range

Total cells in a range

Explanation

If you need to count the number of columns in a range, use the COLUMNS function. In the generic form of the formula (above) rng represents a range of cells.

In the example, the active cell contains this formula:

=COLUMNS(B4:C9)

Here's how the formula works:

COLUMNS counts the number of columns in and returns the result as a number.