Operators

Less than or equal to (<=)

Matches all 6 recorded answers

Recorded: 6 workbook cells. How we measure this · See the Rust code

No local names are recorded for this entry.

What it does

value1 <= value2

A <= B returns TRUE when A precedes B in Excel's comparison order or is equal to it under that order, and FALSE otherwise.

The comparison order and the equality it uses are the family's, stated in full on FUNC.OP_EQUAL: kinds are ordered rather than coerced (number < text < logical), text comparison is case-insensitive, and numeric comparison passes through a normalization lane instead of exact IEEE comparison.

Everything else follows from < and =.

Arguments

PositionNameMeaning
0ALeft operand. Required.
1BRight operand. Required.

Arity is exactly 2; no optional arguments, no defaults. Order is load-bearing.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

Quirks

Result and edge cases

  • Equal operands give TRUE, under the family's equality — which includes the case-insensitive text rule, so "a" <= "A" is TRUE in both directions.
  • Different kinds give the kind ordering; the equality half never fires across kinds, because operands of different kinds are never equal.
  • Blank operands. Context-sensitive: blank behaves as 0 against a number, "" against text, FALSE against a logical. A blank cell is therefore <= 0, <= "" and <= FALSE, all TRUE.
  • Arrays. Ordinary broadcast with #N/A for unsupplied coordinates.

Errors

data/functions/FUNC.OP_LESS_EQUAL.json records no Microsoft documentation URL (docs is null).

How to implement

Notes for implementers

  • Derive <= from the same three-way comparison core as the other five operators. In particular, the equality it uses must be the equality, normalization included; a <= implemented as "exact less-than or normalized-equal", or the reverse, produces a subtly different relation.
  • A<=B must not be implemented as NOT(A>B) while errors are in play: the error must propagate as an error, not be negated into a logical.
  • If the comparison core is a tolerance model rather than a normalization model, <= will be non-transitive near the boundary. Record which model you implemented.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

<= infix · 1 lines · calc-func/src/catalogue/comparison.rs on GitHub
CatalogueEntry::operator(LESS_OR_EQUAL, "<=", Notation::Infix, VALUES, less_or_equal)
less_or_equal · 12 lines · calc-func/src/catalogue/comparison.rs on GitHub
fn less_or_equal(
    arguments: &[CalcValue],
    services: &mut EvalServices<'_>,
) -> Result<CalcValue, FunctionFault> {
    compare(
        LESS_OR_EQUAL,
        arguments,
        services,
        Want::Order,
        Ordering::is_le,
    )
}

Kernels shared with other functions

Argument and result plumbing

No implementation has been published with a Handbook test suite for this function.

Version differences

No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.

Alternatives

Relationships

  • FUNC.OP_LESS_THAN — the strict form, and the operator with which <= disagrees exactly on the normalized-equality band.
  • FUNC.OP_GREATER_EQUAL — the mirror.
  • FUNC.OP_EQUAL — the equality half.
  • MEDIAN, PERCENTILE, QUARTILE, histogram-style FREQUENCY — functions whose bucket boundaries are defined with a closed side. Their internal boundary convention is their own, documented per function; do not assume it matches this operator's normalized equality.
  • COUNTIFS(range,"<=5") — a criteria string, parsed by the consuming function.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents