Please look at how difficult it is to connect SUMIFS, COUNTIFS and IFS to the DoIF function?
I refactored the ugly DoIF function into a dedicated class for evaluation, and then was able to add SUMIFS, COUNTIFS, and AVERAGEIFS. IFS is still missing because it has a different logic in the arguments.
A few tests with files created from Microsoft examples showed that the functions seem to work - mostly. There are a few limitations, though:
- In string comparisons, Excel allows wildcards - this is not supported ATM.
- When a cell contains a condition which is referenced by the formula, the expression parser so far does not reckognize the argument as a cell reference but assumes it is a string. Therefore, something like SUMIFS(A1:A10, B1:B10, C1) where C1 contains the string ">10" is not calculated correctly.