Lookup
How many columns a block covers
Definition
Counting how many columns sit in a range means giving COLUMNS that range.
Syntax
=COLUMNS(array)
Arguments
| Argument | Meaning |
|---|---|
array |
The range whose column count you need, such as B3:E3. |
Worked example
A week strip stores markers at both ends of B3:E3.
| B | C | D | E |
|---|---|---|---|
| 1 | 1 |
Formula: =COLUMNS(B3:E3)
Result: 4. B through E is four columns.
Practice
Cells A1 and F1 each hold 1. In B2, write a formula that returns how many columns are in A1:F1.
- In B2, write a COLUMNS formula for A1:F1.
- B2 should show how many columns are in A1:F1.
Step 1 of 2
Enter =COLUMNS(A1:F1) in B2.
A1:F1 has 6 columns.
Formulas here use English function names, such as SUM, and a period as the decimal separator, in every language.
Loading the sheet…
B2 uses COLUMNS.
B2 now shows 6.
The next lesson is Finding the lowest number in a range.
Related functions
COLUMNS is the function that counts the columns in that range.
Common mistake
Using COLUMN, as in =COLUMN(B3:E3): COLUMN then returns only the first column number, 2, instead of the count 4.