COLUMNS

COLUMNS(array)

Returns the number of columns in a cell range or reference.

arrayThe array or array formula containing the number of columns.

REMARKS
* The "array" can be a cell reference, an array constant or a named range.
* If "array" is not a cell range or an array of values, the #VALUE! is returned.
* You can use the ADDRESS function to return the cell reference given a row and column number.
* You can use the COLUMN function to return the column number of a cell reference.
* You can use the ROW function to return the row number of a cell reference.
* You can use the ROWS function to return the number of rows in a cell range or reference.
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 ABC
1=COLUMNS(B1:B2) = 11020
2=COLUMNS(B1:C2) = 22010
3=COLUMNS({1, 2, 3;4, 5, 6}) = 3  
4=COLUMNS({1, 2, "some text"}) = 3  
5=COLUMNS("some text") = 1  

1 - How many columns are there in the range "B1:B2".
2 - How many columns are there in the range "B1:C2".
3 - How many columns are there in the array {1,2,3 ; 4,5,6}.
4 - How many columns are there in the array {1,2,"some text"}.
5 - How many columns are there in a text string.

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top