Sorry if I'm a bit unclear. I try to put together different names together to one and can pick everything thereafter. I don't actually know how to think or how to do it.
Let us say I have those names:
HB1010X002Y01Z12
HB1010X002Y01Z21
HB1010X002Y01Z22
HB2020X002Y03Z21
HB2020X002Y03Z22
HB2020X002Y04Z21
I want them to be grouped up to HB1010. Because the location names have a starting name with HB1010X002Y02Z21 Same as HB2020 etc.