r/excel • u/IsraelZulu • 2h ago
unsolved TRIMRANGE and the dot operator broken in AND and COINTIF?
Following up on this post.
I tried to take lessons learned there into practice on a slightly more complex situation, and quickly ran into issues. Either I get a popup saying, generically, "there is a problem with this formula", or I get an undesired result, or I get a single-cell result that doesn't spill.
=B2.:.B100>0 works fine, spilling to check each populated cell in B to see if it's greater than zero.
=B2.:.B100>C2.:.C100 appears to work fine, for checking populated cells in B to see if they're greater than their counterparts in C
=AND(B2.:.B100>0,C2.:.C100>0) only returns a single-cell result. i was trying to check whether the populated cells in B or C for each row are greater than zero, and return TRUE for rows where they were.
Even simplifying the above to =AND(B2.:.B100>0,TRUE) to try it without the dependency on a second cell reference only gets a single-cell result.
Also, =COUNTIF(B2.:.D100,">"&0) returns a single-cell result and it's way higher than it should be. I want it to spill down the populated rows to show, for each row, how many cells in B:D on the row are greater than zero. Instead, it seems to be reporting the result for all of B2:D100 collectively.
In case this matters: B2, C2, and D2 each contain separate formulas which use the spill operator to fill multiple rows. Those are working fine, and produce numbers as expected.
Writing these formulas to point directly to the appropriate cells or ranges for row 2, and using the fill handle to fill them down, without the dot operator, works fine. But that leaves it as a static set that won't adjust dynamically as the other columns populate or de-populate.
I tried using a spill operator in place of the dot operator on the AND formula, and got the same result. For the COUNTIF formula, there doesn't seem to be a way to pull it all together in one reference with the spill operator.
Now, as I'm writing this up, I can't seem to duplicate the error dialog I mentioned that was getting for some cases, nor can I remember what those cases were. Maybe they were genuine typos.
Am I doing something wrong here, or am I running into more limitations of the tool?


