The labels parameter

What it does

Groups for the values of a column: "label:value,label:value" for exact values, "label:min:max" for ranges.

A range is [min, max): min included, max not; an empty bound is open on its side ("high:3:" — 3 and above, "low::0" — every value below 0).

Spaces around the colon are not part of the label: "Never : 1" names Never, here and in a labels row above the names.

On a text column the value is the text of the cell ("male:m,female:f").

Labels given here win over the labels of the column (a labels row above the names). Empty — the labels of the column, if it has them.

Groups are listed in the order of the labels. A value outside the labels goes to the group "_other", listed last.

STATS_FREQUENCIES shows the first part as the group name: write "label:value".

STATS_SPLIT_COLS takes both orders, "1:male" and "male:1", and names the columns {column}-{label}.

Without labels, groups follow SPSS: numbers ascending, text alphabetically. A text scale with a natural order (education levels, Likert words) needs labels to keep that order.

Values

Optional.

In plain words

A sheet had a column gender with answers 1 and 2. Without labels, the frequencies table had two rows called 1 and 2, and readers had to guess who is who. With the labels male:1,female:2, the rows were called male and female. For numbers a range works too, such as low:1:3,high:3: where 1 and 2 are low, and 3 and up is high. Any answer that fits no label goes into a group called _other, shown last. Labels typed here win over the labels written above the column names.

Where you use it

Examples

Get it in your sheet

ALS Stats is a free add-on for Google Sheets™.

Install ALS Stats from Google Workspace Marketplace (opens in a new tab)