The way these functions interpret their arguments is inconsistent with
Excel in a few ways:
- EmptyCell: Excel ignores arguments evaluating to these types of
values, treating them as if they didn't exist.
- Text: Text cells are ignored unless they are "TRUE" or "FALSE" (case
insensitive). EXCEPT if the string value comes from a reference, in
which case it is always ignored regardless of its value.
- Error if no args: Excel returns a #VALUE! error for these functions if
no arguments are provided, or if all arguments are ignored (see
above).
- EmptyArg: Bizarrely, Unlike EmptyCell, EmptyArg is not ignored and is
treated as if it were FALSE by Excel.
- ErrorPropagation: Excel propagates errors in the arguments and in
cells belonging to any Range arguments.
Additionally, these functions are not consistent with each other, XOR,
OR, AND vary in how they handle the cases mentioned above.
Rectify these consistency issues by re-implementing them all in terms of
a single base function which is more consistent with Excel behavior.