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.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A ("YES", "NO", "MDR", or "DPL")[/TD]
[TD]Column B (Names)[/TD]
[TD]Column C (Dates)[/TD]
[/TR]
[TR]
[TD]NO[/TD]
[TD]Bill[/TD]
[TD]4/1/2018[/TD]
[/TR]
[TR]
[TD]DPL[/TD]
[TD]Bill[/TD]
[TD]6/14/2018[/TD]
[/TR]
[TR]
[TD]DPL[/TD]
[TD]Bill[/TD]
[TD]7/2/2018[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]Mark[/TD]
[TD]3/3/2018[/TD]
[/TR]
[TR]
[TD]DPL[/TD]
[TD]Mark[/TD]
[TD]3/26/2018[/TD]
[/TR]
[TR]
[TD]MDR[/TD]
[TD]Peter[/TD]
[TD]3/29/2018[/TD]
[/TR]
</tbody>[/TABLE]
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.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Column A ("YES", "NO", "MDR", or "DPL")[/TD]
[TD]Column B (Names)[/TD]
[TD]Column C (Dates)[/TD]
[/TR]
[TR]
[TD]NO[/TD]
[TD]Bill[/TD]
[TD]4/1/2018[/TD]
[/TR]
[TR]
[TD]DPL[/TD]
[TD]Bill[/TD]
[TD]6/14/2018[/TD]
[/TR]
[TR]
[TD]DPL[/TD]
[TD]Bill[/TD]
[TD]7/2/2018[/TD]
[/TR]
[TR]
[TD]YES[/TD]
[TD]Mark[/TD]
[TD]3/3/2018[/TD]
[/TR]
[TR]
[TD]DPL[/TD]
[TD]Mark[/TD]
[TD]3/26/2018[/TD]
[/TR]
[TR]
[TD]MDR[/TD]
[TD]Peter[/TD]
[TD]3/29/2018[/TD]
[/TR]
</tbody>[/TABLE]