Skip to content

Commit 999a96f

Browse files
author
zhengyang.zhu
committed
This related with #2140, alcMatchMatrix function, the parameter matchType is only passed values of 1 and -1 from above.
1 parent f1cc78d commit 999a96f

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

calc.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14998,18 +14998,11 @@ func (fn *formulaFuncs) HYPERLINK(argsList *list.List) formulaArg {
1499814998

1499914999
// calcMatch returns the position of the value by given match type, criteria
1500015000
// and lookup array for the formula function MATCH.
15001+
// matchType only contains -1, and 1.
1500115002
func calcMatchMatrix(vertical bool, matchType int, criteria *formulaCriteria, lookupArray [][]formulaArg) formulaArg {
1500215003
idx := -1
15003-
var result *formulaArg
15004-
1500515004
var calc = func(i int, arg formulaArg) bool {
1500615005
switch matchType {
15007-
case 0:
15008-
if ok, _ := formulaCriteriaEval(arg, criteria); ok {
15009-
out := newNumberFormulaArg(float64(i + 1))
15010-
result = &out
15011-
return true
15012-
}
1501315006
case -1:
1501415007
if ok, _ := formulaCriteriaEval(arg, &formulaCriteria{
1501515008
Type: criteriaGe, Condition: criteria.Condition,
@@ -15047,9 +15040,6 @@ func calcMatchMatrix(vertical bool, matchType int, criteria *formulaCriteria, lo
1504715040
}
1504815041
}
1504915042
}
15050-
if result != nil {
15051-
return *result
15052-
}
1505315043
if idx == -1 {
1505415044
return newErrorFormulaArg(formulaErrorNA, formulaErrorNA)
1505515045
}

0 commit comments

Comments
 (0)