From 5ed5c09bc667ff706c46710a1783c5d9c1c37cdd Mon Sep 17 00:00:00 2001 From: Harrison Booth <73434116+Harrison-Booth@users.noreply.github.com> Date: Mon, 26 Oct 2026 11:39:22 -0500 Subject: [PATCH] NUMBERVALUE: a leftover dot is a decimal point, not a date separator --- crates/functions/src/text.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/functions/src/text.rs b/crates/functions/src/text.rs index db4b6d70c..09fbc2be4 100644 --- a/crates/functions/src/text.rs +++ b/crates/functions/src/text.rs @@ -338,6 +338,10 @@ fn numbervalue(a: &[Arg], c: &mut dyn Ctx) -> R { out.push(c); } } + // A leftover `.` can be a decimal point but never a date separator: `1.2.3` is `#VALUE!` in Excel. + if out.matches('.').count() > 1 { + return Err(CellError::Value); + } let mut n = parse_number_text_in(&out, c.date_system()).ok_or(CellError::Value)?; for _ in 0..pct { n /= 100.0;