COLUMNS function
the number of columns in a reference.
Lookup and reference
Where can you use it?
Reporting and operations teams. Use functions in this group to retrieve a field from an item, employee or order list, select the right record, or move values into another report.
Scenario in the workbook
Check the width of a reference. Included blank columns still count.
A worked example from the workbook
| Row | A |
|---|---|
| 6 | Row |
| 7 | 1 |
| 8 | 2 |
| 9 | 3 |
Record 1
=COLUMNS(A7:C7)Expected result3
See the inputs and instructions for all 3 examplesCopyable formulas
English Excel · en-US
=COLUMNS(A2:D8)Turkish Excel · tr-TR
=SÜTUNSAY(A2:D8)Expected result
4
Worked examples
Check the width of a reference. Included blank columns still count.
Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.
| Row | A |
|---|---|
| 6 | Row |
| 7 | 1 |
| 8 | 2 |
| 9 | 3 |
| Case | Formula | Expected result |
|---|---|---|
| Record 1 | =COLUMNS(A7:C7) |
3 |
| Record 2 | =COLUMNS(A8:C8) |
3 |
| Record 3 | =COLUMNS(A9:C9) |
3 |