Jul 15 2020 08:42 PM
Hi Folks
This has had me wracking my brain for a couple of days, so any suggestions hugely appreciated!
I have a sheet that looks in part like the following there's around 2000 rows, so looking a VBA snippet unless there's a funky sort I've not found :)
1
1
2
3
3
4
4
and I'm after it looking like
1234
134
1234
Thanks in advance!
Jul 15 2020 09:43 PM
@Adrian Watkins , what's the logic of the grouping? I can't see a pattern just by looking at the example.
Jul 15 2020 11:08 PM
@TheAntony thanks for the reply! sorry, it’s repeated groups of up to 1-4 sorted numerically, so they are like 111222333444 but some groups may skip some numbers, so min of one number, max of four and results have to be in numeric order 1234 with no gaps for skipped ones. Full job is combining a series of worksheets that were done by row when they should have been column as source for a mail merge :confounded_face:
Jul 16 2020 08:50 AM
If your version of Excel supports dynamic arrays, and if I understood the logic correctly, you may add helper column
with formula
=--CONCAT(UNIQUE(MID(A1,SEQUENCE(1,LEN(A1)),1),1))
and sort by it.