Given the all to wide example table below, how would one go about identifying:
- Column H or date above as the last cell of the first group of consecutive cells with x.
- Column M or date above as being the first cell of the second group of consecutive x.
+---+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+
| | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P |
+---+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+
| 1 | 14/01/01 | 14/01/02 | 14/01/03 | 14/01/04 | 14/01/05 | 14/01/06 | 14/01/07 | 14/01/08 | 14/01/09 | 14/01/10 | 14/01/11 | 14/01/12 | 14/01/13 | 14/01/14 | 14/01/15 | 14/01/16 |
| 2 | | | | x | x | x | x | x | | | | | x | x | x | |
+---+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+
The maximum size the gap between blocks is 356. the number of 316 in the comments is wrong due to a typo.
Formulas in use:
Identifying first overall x:
=MATCH("x",$A2:$P2,0)
Identifying last overall x:
=MATCH("x",$A2:$P2,1)
Restrictions:
No VBA, excel formulas only.
No Helper cells.
Cannot change the x to a different identifier.
One cell formula for end of first block.
One cell formula for start of second block.
Its easy when I use two different identifiers for the two groups, but using the same identifier I could only figure how to identify the very first and the very last X. I cant figure out how to identify the gap in between. I personally do not think it is possible but I have seen the people answering questions on here do some remarkable things. If you do not think it is possible please say so.