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
| Position | Name | Meaning |
|---|---|---|
| 0 | A | Left operand. Required. |
| 1 | B | Right operand. Required. |
Arity is exactly 2; no optional arguments, no defaults. Order is load-bearing.
Try it
Quirks
Result and edge cases
- Equal operands give
TRUE, under the family's equality — which includes the case-insensitive text rule, so"a" <= "A"isTRUEin 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
0against a number,""against text,FALSEagainst a logical. A blank cell is therefore<= 0,<= ""and<= FALSE, allTRUE. - Arrays. Ordinary broadcast with
#N/Afor 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<=Bmust not be implemented asNOT(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 GitHubCatalogueEntry::operator(LESS_OR_EQUAL, "<=", Notation::Infix, VALUES, less_or_equal)
less_or_equal · 12 lines · calc-func/src/catalogue/comparison.rs on GitHubfn 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
comparecatalogue/comparisonOperand::kindcatalogue/comparisonOperand::blankcatalogue/comparisonordercatalogue/comparisonoverflow_numberscatalogue/comparisonnumberscatalogue/comparisonin_bandcatalogue/comparisonRounded::upcatalogue/comparisonRoundings::ofcatalogue/comparisonRoundings::disjointcatalogue/comparisontextscatalogue/comparisoncomparecatalogue/comparison/collationweighedcatalogue/comparison/collationmeasured_iteration_extensioncatalogue/comparison/collationtablecatalogue/comparison/sort_keydecode64catalogue/comparison/sort_keyReader::bytecatalogue/comparison/sort_keyReader::varintcatalogue/comparison/sort_keyReader::donecatalogue/comparison/sort_keyin_rangescatalogue/comparison/sort_keybuildcatalogue/comparison/sort_keyhan_basecatalogue/comparison/sort_keyderivecatalogue/comparison/sort_keyshared_jamo_tailscatalogue/comparison/sort_keyordinary_jamo_prefixcatalogue/comparison/sort_keyindependent_jamo_suffixcatalogue/comparison/sort_keyjamo_leading_primarycatalogue/comparison/sort_keyleading_ordercatalogue/comparison/sort_keyBefore::separate_specialcatalogue/comparison/sort_keyGathered::kanacatalogue/comparison/sort_keyGathered::unitcatalogue/comparison/sort_keypartscatalogue/comparison/sort_keydiacritic_ordercatalogue/comparison/sort_keydiacriticscatalogue/comparison/sort_keylow32decimalNatural::from_u64decimalNatural::pow10decimalNatural::normalizedecimalNatural::is_zerodecimalNatural::mul_add_smalldecimalNatural::times_pow10decimalNatural::times_pow5decimalNatural::times_pow2decimalExactDecimal::binarydecimal
Argument and result plumbing
CatalogueEntry::operatorcatalogueoperandcoerce
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-styleFREQUENCY— 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