'extract ranges from column values
Solution 1:[1]
I'm not sure if I understand exactly what you mean, but this is what I have done until now: I have copied the same columns A and B, and I have added following columns:
- Column C :
=COUNTIF(B$2:B$16,B2) - Column D :
=IF(AND(C2=C3,C3<>C4),"End",IF(AND(C2<>C3,C3=C4),"Begin"))
The result looks as follows:
As you can see:
- The number 1 from column B ends at row 6, and D6 indeed indicates "End".
- The number 2 from B starts at row 7 (D7="Begin") and ends at row 8 (D8="End").
- The numbers 3 and 4 are not correctly handled but:
- As far as 5 is concerned: it starts at row 11 (D11="Begin") and ends at row 15 (D15="End").
There still is some finetuning to do but I guess you see how the ranges start being unfold.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dominique |


