ONLYOFFICE VARA: Sample Variance with Text, Booleans and Group Checks
Calculate ONLYOFFICE sample variance with typed inputs, distinguish blanks from empty text and combine groups without losing between-group variation.
Verification status: Ten scalar mixed-input cases checked in ONLYOFFICE Desktop Editors Community 10.0.0.169 on Linux x64; additional worksheet and illustration results independently calculated. Docs, mobile and other builds untested. How formula examples are checked
VARA calculates sample variance, including text as zero and TRUE/FALSE as one/zero. Truly empty cells are ignored. Its result has squared measurement units, unlike a standard deviation.
For numeric 4 and 6, =VARA(4,6) returns 2. Adding the text pending to the tested range changes the result to approximately 9.3333333333, because that text contributes an included zero observation.
Availability and version history
- Introduced: The first introduction release and date are not established by the checked sources.
- Availability: Currently documented in ONLYOFFICE’s rolling Spreadsheet Editor help; no final supported-version endpoint is established.
- Scope: Ten scalar cases were executed in Desktop Editors Community 10.0.0.169 on Linux x64. Docs, other desktop builds and mobile clients were not tested.
- Checked: October 14, 2026, against the official VARA reference, source code and saved native results. Additional worksheet and illustration reconstructions were independently calculated.
Syntax
VARA(value1, [value2], ...)
The official entry documents one leading value argument and optional further arguments, up to 255 values. A range can supply multiple observations. This argument limit is not a claim that a range is limited to 255 cells. Use the separator accepted by your spreadsheet locale; the formulas below follow the English help’s comma notation.
Input handling and the sample denominator
The official help describes sample variance and text/Boolean conversion, with empty cells ignored. The pinned implementation uses n − 1 for the sample denominator. The native scalar/reference cases below confirm its text-zero mapping for the exact tested inputs.
Do not assume STDEVA(range)^2 always reproduces VARA for a mixed range in this desktop build. Our STDEVA tests omitted ordinary nonnumeric text, whereas VARA included it as zero. The variance/standard-deviation identity applies when the included numeric observations are the same.
Reproduce the ten build-scoped cases
Create a sheet named TypedDispersion, leaving space through column J and row 16. Enter the following inputs in column B. Labels can go in A; put outputs in G so no formula overwrites an input.
| Cell | Entry | Intended stored type |
|---|---|---|
| B6 | 4 |
Number |
| B7 | 6 |
Number |
| B8 | pending |
Text |
| B9 | =TRUE() |
Logical TRUE |
| B10 | =FALSE() |
Logical FALSE |
| B11 | Leave genuinely empty | No stored value |
| B12 | Enter 2 after setting the cell to Text |
Text containing 2 |
| B13 | 0 |
Number |
| B14 | ="" |
Formula returning empty text |
Do not enter quote characters around the text in B8 or B12. If B12 is converted to a numeric cell during import, it is no longer the same test. The native fixture’s input types were checked from the saved workbook, not inferred from appearance.
The following results were observed after an explicit workbook recalculation in Desktop Editors Community 10.0.0.169, Linux x64 and verified in its saved output. Displayed decimals are rounded to ten places.
| Output cell | Formula | Observed result | Comparison |
|---|---|---|---|
| G6 | =VARA(B6:B7) |
2.0000000000 | Numeric baseline |
| G7 | =VARA(B6:B8) |
9.3333333333 | Ordinary text in a range |
| G8 | =VARA(B6:B10) |
7.2000000000 | Text and Boolean values |
| G9 | =VARA(B6:B7,B11) |
2.0000000000 | Explicit empty reference |
| G10 | =VARA(B6:B7,B12) |
9.3333333333 | Numeric text reference |
| G11 | =VARA(4,6,"2") |
9.3333333333 | Numeric text literal |
| G12 | =VARA(4,6,"pending") |
9.3333333333 | Ordinary text literal |
| G13 | =VARA(B6:B7,B13) |
9.3333333333 | Actual numeric zero |
| G14 | =VARA(B6:B7,B14) |
9.3333333333 | Formula-produced empty text |
| G15 | =VARA(B6:B11) |
7.2000000000 | Mixed range including a blank |
The exact numeric string 2 contributes zero in both the reference and literal tests, just like ordinary text. The true empty-cell reference is excluded, while B14’s empty-text formula contributes zero. Consequently, the broad mixed range in G15 agrees with G8. These observations do not establish every imported text grammar, array-constant or empty-set result.
Reconstruct the mixed sample
The observed G8 result uses 4,6,0,1,0, with mean 2.2. Its squared deviations are 3.24,14.44,4.84,1.44,4.84, totalling 28.8. Dividing by n − 1 = 4 gives 7.2. The standard deviation of this numeric reconstruction is approximately 2.6832815730.
A status label that means “not measured” should not automatically become a zero observation. Decide the intended data model before choosing a text-inclusive function.
Advanced: combine groups with their between-group variation
Create GroupedSample. Put 2,4,6 in A2:A4 and 8,10,12 in B2:B4. The following are independently calculated numeric examples.
| Cell | Formula | Expected result |
|---|---|---|
| D2 | =VARA(A2:A4) |
4 |
| D3 | =VARA(B2:B4) |
4 |
| D4 | =VARA(A2:A4,B2:B4) |
14 |
| D5 | =(D2+D3)/2 |
4 |
| D6 | =(3-1)*D2+(3-1)*D3 |
16 |
| D7 | =3*(4-7)^2+3*(10-7)^2 |
54 |
| D8 | =(D6+D7)/(6-1) |
14 |
The group means are 4 and 10, and the combined mean is 7. Within-group squared deviations contribute 16; the means’ separation contributes another 54. Dividing the combined 70 by five produces 14. Simply averaging the two variances misses the between-group contribution.
The counts and means in D6:D8 belong to this displayed dataset. If values or stored types change, recalculate those quantities rather than retaining the constants as though they were live summaries.
Reconstruct the official illustration
On a separate VendorGrid sheet, enter this 4-by-4 grid in A1:D4. Numeric entries are numbers, text is ordinary text, and the TRUE/FALSE entries are formulas producing logical values.
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | 1 |
0 |
0 |
=FALSE() |
| 2 | text |
1 |
0 |
0 |
| 3 | 2 |
3 |
=TRUE() |
7 |
| 4 | 6 |
8 |
10 |
12 |
In F2 enter =VARA(A1:D4). The independently reconstructed result is approximately 16.4291666667, matching the precision shown in the vendor illustration. This entire illustration was not part of the native ten-case fixture. Its displayed values do not, on their own, prove the original screenshot workbook’s stored types.
Limits and related functions
The examples do not establish exact errors for empty datasets, error cells, huge magnitudes or malformed arguments. A sample needs a usable n − 1 denominator mathematically; the one-value error behavior remains untested.
Use VAR.S for its separately documented numeric-oriented contract. VARPA calculates population variance. STDEVA calculates sample standard deviation, but its tested mixed-text inclusion differs, so check the included observations before squaring its result.