1. Count columns in the full timesheet
| Task | Owner | Start Date | Due Date | Hours Logged |
| Design | Alice | 2024-01-01 | 2024-01-05 | 8 |
| Development | Bob | 2024-01-03 | 2024-01-10 | 12 |
| Testing | Carol | 2024-01-08 | 2024-01-12 | 6 |
=COLUMNS({"Task","Owner","Start Date","Due Date","Hours Logged";"Design","Alice","2024-01-01","2024-01-05",8;"Development","Bob","2024-01-03","2024-01-10",12;"Testing","Carol","2024-01-08","2024-01-12",6})
Result: 5
The array literal contains five fields across every row: Task, Owner, Start Date, Due Date, and Hours Logged. COLUMNS simply counts those fields, ignoring the number of rows, and returns 5.
2. Determine width of a trimmed view (Task and Owner only)
| Task | Owner |
| Design | Alice |
| Development | Bob |
| Testing | Carol |
=COLUMNS({"Task","Owner";"Design","Alice";"Development","Bob";"Testing","Carol"})
Result: 2
Here the array literal has been reduced to the first two columns of the timesheet. COLUMNS counts those two columns and returns 2, regardless of how many rows are present.
3. Show effect of TRANSPOSE on column count
| Task | Owner | Start Date | Due Date | Hours Logged |
=COLUMNS(TRANSPOSE({"Task","Owner","Start Date","Due Date","Hours Logged"}))
Result: 1
TRANSPOSE flips the single-row array into a single-column array (5 rows, 1 column). COLUMNS then reports the width of that transposed array, which is 1.