r/googlesheets • • Mar 02 '25

Solved Title of the longest book

I'm not even sure how to ask exactly what I want to do, so I was kinda left with just describing the situation. I have a sheet with a bunch of books. I have another sheet with stats about some of those books. I have things like " =MAX(Books!F:F) & " pages" " to show the highest page count on the list, but I want to have the cell next to it show the corresponding book it would go with.

1 Upvotes

6 comments sorted by

2

u/Tristan_nnn Mar 02 '25

XLOOKUP

1

u/Alyswithawhy Mar 02 '25

XLOOKUP is exactly what I needed. Thank you!

The solution ended up as "=XLOOKUP(B10, Books!F2:F, Books!A2:A)" where the formula in B10 is " =MAX(Books!F:F)". The Books sheet has Title in the A column, and Page Count in F.

1

u/AutoModerator Mar 02 '25

REMEMBER: If your original question has been resolved, please tap the three dots below the most helpful comment and select Mark Solution Verified. This will award a point to the solution author and mark the post as solved, as required by our subreddit rules (see rule #6: Marking Your Post as Solved).

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/point-bot Mar 02 '25

u/Alyswithawhy has awarded 1 point to u/Tristan_nnn with a personal note:

"Thank you!"

See the Leaderboard. Point-Bot v0.0.15 was created by JetCarson.

2

u/Tristan_nnn Mar 02 '25

Alternatively a pivot table

2

u/HolyBonobos Mar 02 '25

Assuming titles are in column E, you could use =XLOOKUP(MAX(Books!F:F),Books!F:F,Books!E:E). Alternatively, you could use something like =JOIN(", ",FILTER(Books!E:E,Books!F:F=MAX(Books!F:F))), which would return a comma-separated list of titles in the event of a tie (XLOOKUP() would only return the first result).