Add GEOMEAN to Functions

This commit is contained in:
Andrew Fillmore
2024-12-10 13:47:50 -08:00
committed by Nicolás Hatcher Andrés
parent 5f3856350b
commit 4c3374c0de
2 changed files with 87 additions and 1 deletions

View File

@@ -140,6 +140,7 @@ pub enum Function {
Countifs,
Maxifs,
Minifs,
Geomean,
// Date and time
Date,
@@ -248,7 +249,7 @@ pub enum Function {
}
impl Function {
pub fn into_iter() -> IntoIter<Function, 194> {
pub fn into_iter() -> IntoIter<Function, 195> {
[
Function::And,
Function::False,
@@ -348,6 +349,7 @@ impl Function {
Function::Countifs,
Function::Maxifs,
Function::Minifs,
Function::Geomean,
Function::Year,
Function::Day,
Function::Month,
@@ -611,6 +613,7 @@ impl Function {
"COUNTIFS" => Some(Function::Countifs),
"MAXIFS" | "_XLFN.MAXIFS" => Some(Function::Maxifs),
"MINIFS" | "_XLFN.MINIFS" => Some(Function::Minifs),
"GEOMEAN" => Some(Function::Geomean),
// Date and Time
"YEAR" => Some(Function::Year),
"DAY" => Some(Function::Day),
@@ -818,6 +821,7 @@ impl fmt::Display for Function {
Function::Countifs => write!(f, "COUNTIFS"),
Function::Maxifs => write!(f, "MAXIFS"),
Function::Minifs => write!(f, "MINIFS"),
Function::Geomean => write!(f, "GEOMEAN"),
Function::Year => write!(f, "YEAR"),
Function::Day => write!(f, "DAY"),
Function::Month => write!(f, "MONTH"),
@@ -1054,6 +1058,7 @@ impl Model {
Function::Countifs => self.fn_countifs(args, cell),
Function::Maxifs => self.fn_maxifs(args, cell),
Function::Minifs => self.fn_minifs(args, cell),
Function::Geomean => self.fn_geomean(args, cell),
// Date and Time
Function::Year => self.fn_year(args, cell),
Function::Day => self.fn_day(args, cell),