Years and years ago I was a dBase guru. Yes, I could take a comma delimited or ASCII SDF file and suck it into a dBase database, then write a very short program and have a mailing list in any order you wanted - last name, city, state, zipper, whatever.
I could probably still do it with dBase V for DOS, but there are more modern databases available today. Microsoft Access? So I'm sure that anybody familiar with a good PC-based database program can do exactly what you're needing done, and in a graphical user interface (GUI) such as Windows instead of my old MS-DOS.
I'm not a spreadsheet person. If I had the info in a spreadsheat, I'd kick it out as an SDF file, then suck the SDF file into a database so I could format and print reports from the database, such as a mailing list or an envelope addressing or label printing routine. I suspect a good spreadsheet person could do something similar with spreadsheet software, but I was always into using the much more powerful dBase database software.
Yes, I did that stuff for a living for lots of years.

But I retired in 1992 and haven't written more than a few personal apps since then.
And yes, I'm older than dirt.
ASCII = American Standard Code for Information Interchange. You younger folks might think of it as a font.
SDF = standard data format, which is fixed columns such as a telephone book. Where, for example, columns 1 thru 20 are name, 21 thru 35 are address, 36 thru 50 are city. 51 and 52 are state, etc.
Most computer systems can produce an ASCII file in SDF. In my world, I took ASCII SDF data files from mainframes and sucked them into PCs for further processing.
Comma seperated values (CSV) files, or what we called comma delimited files, are similar to SDF files except fields are seperated by commas instead of being in an exact position in the file. One comma can replace several blanks, so the CSV files take up less disk space than SDF files. Disk space is dirt cheap today, but back 40 or 50 years ago it was very expensive, so lots of computer systems stored data in CSV files instead of SDF files.