-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SUM() behaviour with boolean parameters #859
Comments
Hello, thanks for reporting this. While your formula/values indeed returns 2, this...
...and this...
...both returns 0 in Excel. While this - applied on A1 in your example - will return 1:
So the logic seems to be that individual boolean parameters that originates from an evaluation are treated as 1/0 rather than booleans. We will investigate this further and will adjust the behaviour in a coming version. |
Hi,
I've identified a discrepancy between how Excel behaves when the
SUM()
function is given a series of boolean predicates and how EPPlus handles the same expression.For example, given a sheet with the text "Yes" in cells A1 and A2, then the expression
=SUM(A1="Yes",A2="Yes", A3="Yes")
Excel will return 2 and EPPlus returns 0.It is worth noting that performing a
SUM()
over a named range that contains only boolean values (TRUE/FALSE) returns 0 in both EPPlus and Excel, it is only this case where the values are individual parameters that Excel treats them as1
and0
and sums them up.The text was updated successfully, but these errors were encountered: