Search code examples
excelsortingduplicatesalphabetical

MS Excel Formula: Remove Duplicates, Blanks, Sort Alphabetically based on a Criteria


I would like a formula that would Extract Unique Values Column: (C2:C30), based on criteria (A2="Car") that matches Column (B2:B30), and Sort in Ascending Order (A-Z), while removing blanks and produce "Output Results" in Column: (D2:D30).

EXAMPLE:

Column A2 Car

Column B2:B30 (Group) Column C2:C30 (Type)
Car Chevrolet
Car Ford
Car Honda
Truck GMC

Car Honda
Car Lexus
SUV Cadillac

Car Kia

Car Toyota
Car Mercedes
Car BMW
SUV GMC

Truck Ford
Car Hyundai
Truck Toyota

Car Cadillac
Car Pontiac

====================================
Column D2:D30 based on "Car" criteria (Output Results)

BMW
Cadillac
Chevrolet
Ford
Honda
Hyundai
Kia
Lexus
Mercedes
Pontiac
Toyota


Solution

  • With Office 365 one can use the following formula to display the list:

    =SORT(UNIQUE(FILTER(C2:C30,B2:B30=A2)))
    

    As of the date of this answer these formulas are coming, and only available to those who are part of the office insiders group. But will hopefully soon be sent to all Office 365 users.

    I put this here for future reference.

    enter image description here