Syntax
=COLUMNS(array)Arguments
| Argument | Required | Description |
|---|---|---|
array | Required | A range or array |
How to use COLUMNS
COLUMNS takes 1 required argument. Type =COLUMNS( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=COLUMNS({1,2,3;4,5,6})Result =COLUMNS(A1:C5)Result Related lookup and reference functions
- ADDRESSBuilds a cell address as text from a row and column number.
- AREASReturns the number of areas (separate ranges) in a reference.
- CHOOSEReturns the value in a list at the given position.
- COLUMNReturns the column number of a reference, or of the cell with the formula when left out.
- FORMULATEXTReturns the formula in a cell as text.
- GETPIVOTDATAReturns data from a pivot table. Refer to the pivot table cells directly instead.
- HLOOKUPLooks for a value in the first row of a table and returns the value in the same column from another row.
- INDEXReturns the value or reference at a given row and column of a range or array.
- INDIRECTReturns the reference written in a text value, such as "B3" or "Sheet2!A1:A10".