LesterLyu / fast-formula-parser

Parse and evaluate MS Excel formula in javascript.
https://www.npmjs.com/package/fast-formula-parser
MIT License
454 stars 63 forks source link

SEARCH and COUNTIF array criteria breaking #59

Open pb-0 opened 1 year ago

pb-0 commented 1 year ago

SEARCH and COUNTIF seem not to support arrays in criteria argument. For both functions, only the first element is evaluated.

For example, SEARCH evaluates "outlook.com" but not "gmail.com":

IF(SUMPRODUCT( -- ISNUMBER(SEARCH({"outlook.com", "gmail.com"},A1)))>0,A1,RIGHT(A1,LEN(A1)-FIND("@",A1)))

A1: paul@gmail.com

--> result: gmail.com

A1: paul@outlook.com

--> result: paul@outlook.com

Same in COUNTIF