Contact

COLUMNS: Count a Range’s Width in WPS Spreadsheet

Lookup and Reference Intermediate WPS Spreadsheet

Count columns in a rectangular range with COLUMNS. Separate range width, worksheet position and populated-cell counts using reproducible examples.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

COLUMNS returns the width of a range or array, measured in columns. It does not count populated cells and does not return the worksheet position of the first or last column. A rectangular range can contain many rows while still having a width of one.

Syntax

=COLUMNS(array)

The required argument can be an array, array formula or cell-range reference according to the official lesson. The examples here use ordinary contiguous rectangular references, avoiding unverified dynamic-array behavior. Unlike COLUMN, this documented syntax has no omitted-reference default.

Worked range geometry

Enter the following formulas in cells outside the referenced examples. No particular data values are needed: the result is determined by the range’s dimensions.

Formula Independently expected result
=COLUMNS(C2:G8) 5
=COLUMNS(C2:C8) 1
=COLUMNS(AA3:AC3) 3
=COLUMNS(B9) 1
=COLUMNS($B$2:D2) 3
=COLUMNS(B2:D6)*5 15

C2:G8 spans C, D, E, F and G: five columns. Its seven-row height does not multiply the COLUMNS result. C2:C8 is one column even though it covers seven cells. AA3:AC3 is three columns; the fact that those worksheet indices are 27 through 29 does not make the width 29.

The final expression multiplies the width of B2:D6, which is 3, by its independently known height of 5. The product 15 is the number of allocated grid positions, not the number of completed entries.

Practical case: distinguish planned fields from filled values

Suppose an input template reserves B2:F2 for five monthly measurements. =COLUMNS(B2:F2) describes the five planned fields even when some are empty. This is useful for checking the template’s shape. It cannot tell you whether all measurements have been supplied.

If a redesigned template extends to H, the explicit range B2:H2 has width seven. Compare that shape with the expected number of categories before using it in a calculation. Counting labels or measurements is a separate data-quality task; choose a value-counting function for that question.

Avoid common mix-ups

COLUMN identifies a column’s position; COLUMNS counts the width of the supplied object. The similarly named functions are not interchangeable. An endpoint-inclusive width is last column index minus first column index plus one, so B:D is 4−2+1=3. Omitting the final one causes an off-by-one error.

The lesson supports ranges and arrays but does not establish discontiguous-union handling, three-dimensional references or automatic spill resizing. Keep a simple rectangular reference when those capabilities are unnecessary. Hidden-column, filtered-view and merged-cell presentation are not tested here; the examples concern the explicit reference geometry.

Errors and checking inputs

Supply the required argument and inspect the selected range in the formula. An accidentally extended range can produce a plausible but unwanted width without any error. The lesson does not enumerate exact error tokens for malformed references, missing arguments or unsupported array expressions, so no execution-based error promise is made. Absolute dollar signs control copying rather than changing the original dimensions.

Availability and evidence

The official WPS lesson is dated 2019-05-24 and explicitly labels its applicability WPS Office for Windows Personal. It does not identify a numeric release. This establishes documentation by that date, not the function’s original introduction or its last working version. Current build limits and equivalence across WPS clients remain unverified. The available evidence does not establish retirement or formal deprecation.

Checked October 18, 2026. The examples in this guide are original, independently calculated controls based on the lesson. They have not been run in WPS or another spreadsheet application. No screenshot or execution result is claimed.