Forum Discussion
COUNTIF with dates
SergeiBaklan basically your examples here are that any math action will prompt Excel to try to convert the values, in this case Boolean, to a number. The very popular "--" forces a negate and then negate again so you end up with the "original value" as a value instead of text or Boolean. I suspect its popularity is that it is probably the most compact way to force a conversion and result in the "same" value and is visually unobtrusive. I'm sure you two already know all this but thought I would add it for others that might read this thread.
You are right; I probably should have referred to the more positive features of '--' rather than limiting my comment to the more negative 'mathematically obscure'. I do remember being disoriented by it, though, when I first encountered the notation in a SUMPRODUCT, but one gets used to it.
- SergeiBaklanJul 17, 2020Diamond Contributor
Some ago (long ago) I shifted in SUMPRODUCT() on *1 since had couple of cases when people removed double dash considering minus on minus in any case returns plus, and two minuses only complicate the formula, But now I'm again mostly on double dash.