Share via

use unique function while also sorting

Anonymous
2024-08-08T16:56:12+00:00

I have unique function that's related to 2 columns and any time I sort the two columns it alters the list of unique values. Is there a way to sort the unique values alphabetically and not have it react to when I sort my input data columns?

Sorted by column A does this to column E:

Bag Item Packed
car (kids) activity/coloring books car (kids)
car (kids) blankets car (me)
car (kids) crayons diaper bag
car (kids) pillow(s) Gavin
car (kids) puke bags kids (all)
car (me) flippy Logan
diaper bag blk bottle holder bag Mason
Gavin bathing suit me

Sorted by B does this:

Bag Item Packed
car (kids) activity/coloring books car (kids)
Gavin bathing suit Gavin
Logan bathing suit Logan
Mason bathing suit Mason
car (kids) blankets diaper bag
diaper bag blk bottle holder bag me
Gavin bottles car (me)

Like I understand why it's doing that, I'm just trying to see if there's a way to absolutely sort regardless of how A & B are sorted. Thanks!

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Rich~M 20,370 Reputation points Volunteer Moderator
    2024-08-08T19:01:02+00:00

    If I understand correctly, you are using a UNIQUE function in Column E for the data in Column A and want it to be sorted alphabetically regardless of how you sort the data in Columns A:C. You can put a SORT function in front of the UNIQUE function to sort the results of that function like this. This will sort the unique results no matter what order they are in in Column A.

    =SORT(UNIQUE(A2:A16))

    5 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2024-08-09T12:50:07+00:00

    yes, thank you! I had the sort function in my formula but for some reason it wasn't working. Yours fixed it :) Thanks again!

    0 comments No comments