Sort Multiple Rows with Custom Sort Order

mharper90

Board Regular
Joined
May 28, 2013
Messages
117
Office Version
  1. 365
Platform
  1. MacOS
I'm trying to sort ws1 (data starts in row 7) using a custom sort in one of the columns, and normal ascending sorting in some others.

The data needs to stay together in each row.
The set of data is a list of names in column B. These should be sorted alphabetically. There are several duplicate names.
The first instance of a name will either have "YES", "NO", or "MDR" in column A.
Each additional duplication of the same name will have "DPL" in column A. I want all "DPL"s of the same name to be after the first instance ("YES", "NO", or "MDR") in the sort order.
Lastly, I want the "DPL"s to be sorted chronologically based on the date in column C.


I've provided a little example to show you what I'm looking to do. I'm having trouble wrapping my head around how to do this properly. Also, since I think the above list is a little complicated, I added a quick summary below that might make the most sense while looking at the sample table.

First priority is names in alphabetical order.
Then the first instance of each name ("YES", "NO", or "MDR") appears higher on the list than the duplicates "DPL"s of the same name.
Lastly, all "DPL"s of the same name should be sorted chronologically.

Column A ("YES", "NO", "MDR", or "DPL")Column B (Names)Column C (Dates)
NOBill4/1/2018
DPLBill6/14/2018
DPLBill7/2/2018
YESMark3/3/2018
DPLMark3/26/2018
MDRPeter3/29/2018

<tbody>
</tbody>
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Sort Column A A to Z
Sort Column B with Custom List YES,NO,MDR,DPL
Sort Column C A to Z
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,603
Members
449,038
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top