この関数は Google スプレッドシートでも Excel と同じように機能します。構文も引数も同じです。
COLUMNS(array)The COLUMNS function counts the total number of columns within a specified range or array. It is commonly used to determine the width of a dataset or to create dynamic references in complex formulas.
=COLUMNS(A1:C5)結果: 3
Returns 3 because the range A1:C5 spans three columns (A, B, and C).
No, the COLUMNS function expects a single reference or array and will return an error if multiple non-contiguous ranges are provided.