CheckEmoji Community · the emoji forum
🏠 Home 🆕 What's new ❓ Unanswered 🔥 Popular 📡 RSS Members 👥 0 online log in · register
Home › IT › IT Support › How to sort a list by the last word?

How to sort a list by the last word?

Started by Jessica Morris6 · · 👁 3 views · 3 replies

📡 Subscribe to replies

Participants Jessica Morris6rowdyotter12wiredcanyon94
Jessica Morris6 Jessica Morris6 Active MemberOP
195 messages
joined Nov 2022
#1 ·
I've got this massive list and I really need to sort it by year—specifically by the value inside the parentheses. Is there some kind of online tool or anything else out there that can handle that for me?

Like, if I want to take a list formatted like this:

Quote: I Wanted Wings (1941)
Independence Day (1996)
Indiana Jones and the Temple of Doom (1984)
Innerspace (1987)
Life of Pi (2012)
The Longest Day (1962)
Marooned (1969)
Mighty Joe Young (1949)
Pirates of the Caribbean: Dead Man's Chest (2006)
Plymouth Adventure (1952)

and turn it into something like this:

Quote: I Wanted Wings (1941)
Mighty Joe Young (1949)
Plymouth Adventure (1952)
The Longest Day (1962)
Marooned (1969)
Indiana Jones and the Temple of Doom (1984)
Innerspace (1987)
Independence Day (1996)
Pirates of the Caribbean: Dead Man's Chest (2006)
Life of Pi (2012)

The problem is, once I finally finish this project, I’m going to be staring at over 1,200 titles...
rowdyotter12 rowdyotter12 Member
48 messages
joined Jul 2020
#2 ·
If you have Excel, you can actually pull this off—I managed to make it work myself. (And hey, if you don't have it, just shoot me a message :P)

Well, even so—I had to go ahead and download a specific add-on. Ablebits With which...
Well, I went and did it—I actually put back that opening parenthesis I had previously deleted, which ended up limiting exactly what... well, you know.
Just head over to whichever column you need—usually right where the data splits—and then simply run an A-Z sort. And just like that, you're all set.

Honestly, that’s all I know—and frankly, I might be wrong. There’s probably a much simpler, more efficient way to handle this out there somewhere, but I haven't stumbled upon it yet.

image
Jessica Morris6 Jessica Morris6 Active MemberOP
195 messages
joined Nov 2022
#3 ·
Thanks, I'll definitely put this to use. Someone else actually whipped up a script for this exact same task for me once. Here’s the link if anyone else finds themselves stuck needing it.

http://prijevodi-online.org/korisnic...ortMovies.html

Just a heads-up, you need to make sure that last row has the year in parentheses. That's what allowed it to sort correctly for me...
wiredcanyon94 wiredcanyon94 Active Member
129 messages
joined Nov 2022
#4 ·
You can actually handle all that string manipulation right in Excel using basic text functions—no need to go downloading shady add-ons or messing around with complex scripts.

Let’s say you’ve got a column, Column A, filled with those movie titles.
Just pop this formula into cell B1: "=RIGHT(A1,6)"
No quotes needed, obviously. This just grabs the last six characters from whatever is sitting in cell A1.
Then, just grab the corner of cell B1 and drag it all the way down to cover your whole list, whether that's 1,200 rows or whatever mess you're working with.

Once that's done, just sort the whole sheet based on Column B.
After everything is organized, you can just delete Column B if it's useless to you now. Or hide it. Whatever.

There you go.

You must log in or register to reply here.

Log in Register

🔗 Similar threads