Ian wants to count all the S’s in a certain range. That’s easy enough using COUNTIF(), but he also wants to count only blocks of S’s. To illustrate
There are five S’s, but only three blocks of S’s, namely A2, C2:E2, and H2. If you can afford to leave column I blank, you can use an array formula to make that calculation. This formula only counts an S if the next cell is not an S.
By offsetting the ranges used in the array formula, I can compare a cell to its neighbor. Don’t forget Ctl+Shift+Enter to enter and edit array formulas.