If I understand your question correctly, you have a data set as below:
Col1 Col2
Allan Ziad
Betty Alexander
Cetty Cyan
You want to make sure that the rows (ie. Allan and Ziad) is in the same row
after sorting.
Actually, this is standard Excel functionality, so simply using Data -> Sort
will solve your problem.
If you are working with these kinds of data a lot, you should try to look at
a Excel feature called a "list", which have some great functions for
manipulating these lists of data.