I have a large set of data where i need to make lots of groups

for example

X
1
2
3
Y
1
2
3

Can anyone help me make a macro that finds names and groups them so it will look like

X
Y

Any Help Appreciated
Thanks