List Names in Chronological Order With Duplicate Dates

KnightFhawker

New Member
Joined
Dec 7, 2016
Messages
17
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. Mobile
  3. Web
Hi everyone!

I hope someone can help me get to the final step. Using a formula, most likely an array, I would like to reorder my list of names in chronological order (by date). I have already created columns of data that I believe would get me to the final step, but I can't seem to finalize the formula with the correct structure. Based on the columns I have included as an example below, the Name (By Date) column is the one I need to find a formula for to get the Name Column in Date order, essentially matching the order of the Sorted Date column. If you can help I would greatly appreciate it. Thanks in advance!

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Count[/TD]
[TD]Name[/TD]
[TD]Date[/TD]
[TD]Sorted Date[/TD]
[TD]Date Count[/TD]
[TD]Name (By Date)[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Name A[/TD]
[TD]2/5/17[/TD]
[TD]1/18/17[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Name B[/TD]
[TD]3/1/17[/TD]
[TD]2/5/17[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Name C[/TD]
[TD]4/1/17[/TD]
[TD]3/1/17[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Name D[/TD]
[TD]5/1/17[/TD]
[TD]3/20/17[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Name E[/TD]
[TD]8/1/17[/TD]
[TD]4/1/17[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Name F[/TD]
[TD]9/1/17[/TD]
[TD]4/1/17[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Name G[/TD]
[TD]1/18/17[/TD]
[TD]4/1/17[/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Name H[/TD]
[TD]4/1/17[/TD]
[TD]5/1/17[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]Name I[/TD]
[TD]3/20/17[/TD]
[TD]5/1/17[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]Name J[/TD]
[TD]4/1/17[/TD]
[TD]6/20/17[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]Name K[/TD]
[TD]5/1/17[/TD]
[TD]7/15/17[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]Name L[/TD]
[TD]6/2/17[/TD]
[TD]8/1/17[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]Name M[/TD]
[TD]7/15/17[/TD]
[TD]9/1/17[/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Try:

ABCDEF

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="bgcolor: #FAFAFA"]Count[/TD]
[TD="bgcolor: #FAFAFA"]Name[/TD]
[TD="bgcolor: #FAFAFA"]Date[/TD]
[TD="bgcolor: #FAFAFA"]Sorted Date[/TD]
[TD="bgcolor: #FAFAFA"]Date Count[/TD]
[TD="bgcolor: #FAFAFA"]Name (By Date)[/TD]

[TD="align: center"]2[/TD]
[TD="bgcolor: #FAFAFA, align: right"]1[/TD]
[TD="bgcolor: #FAFAFA"]Name A[/TD]
[TD="bgcolor: #FAFAFA, align: right"]2/5/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]1/18/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]1[/TD]
[TD="bgcolor: #FAFAFA"]Name G[/TD]

[TD="align: center"]3[/TD]
[TD="bgcolor: #FAFAFA, align: right"]2[/TD]
[TD="bgcolor: #FAFAFA"]Name B[/TD]
[TD="bgcolor: #FAFAFA, align: right"]3/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]2/5/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]1[/TD]
[TD="bgcolor: #FAFAFA"]Name A[/TD]

[TD="align: center"]4[/TD]
[TD="bgcolor: #FAFAFA, align: right"]3[/TD]
[TD="bgcolor: #FAFAFA"]Name C[/TD]
[TD="bgcolor: #FAFAFA, align: right"]4/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]3/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]1[/TD]
[TD="bgcolor: #FAFAFA"]Name B[/TD]

[TD="align: center"]5[/TD]
[TD="bgcolor: #FAFAFA, align: right"]4[/TD]
[TD="bgcolor: #FAFAFA"]Name D[/TD]
[TD="bgcolor: #FAFAFA, align: right"]5/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]3/20/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]1[/TD]
[TD="bgcolor: #FAFAFA"]Name I[/TD]

[TD="align: center"]6[/TD]
[TD="bgcolor: #FAFAFA, align: right"]5[/TD]
[TD="bgcolor: #FAFAFA"]Name E[/TD]
[TD="bgcolor: #FAFAFA, align: right"]8/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]4/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]1[/TD]
[TD="bgcolor: #FAFAFA"]Name C[/TD]

[TD="align: center"]7[/TD]
[TD="bgcolor: #FAFAFA, align: right"]6[/TD]
[TD="bgcolor: #FAFAFA"]Name F[/TD]
[TD="bgcolor: #FAFAFA, align: right"]9/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]4/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]2[/TD]
[TD="bgcolor: #FAFAFA"]Name H[/TD]

[TD="align: center"]8[/TD]
[TD="bgcolor: #FAFAFA, align: right"]7[/TD]
[TD="bgcolor: #FAFAFA"]Name G[/TD]
[TD="bgcolor: #FAFAFA, align: right"]1/18/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]4/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]3[/TD]
[TD="bgcolor: #FAFAFA"]Name J[/TD]

[TD="align: center"]9[/TD]
[TD="bgcolor: #FAFAFA, align: right"]8[/TD]
[TD="bgcolor: #FAFAFA"]Name H[/TD]
[TD="bgcolor: #FAFAFA, align: right"]4/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]5/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]1[/TD]
[TD="bgcolor: #FAFAFA"]Name D[/TD]

[TD="align: center"]10[/TD]
[TD="bgcolor: #FAFAFA, align: right"]9[/TD]
[TD="bgcolor: #FAFAFA"]Name I[/TD]
[TD="bgcolor: #FAFAFA, align: right"]3/20/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]5/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]2[/TD]
[TD="bgcolor: #FAFAFA"]Name K[/TD]

[TD="align: center"]11[/TD]
[TD="bgcolor: #FAFAFA, align: right"]10[/TD]
[TD="bgcolor: #FAFAFA"]Name J[/TD]
[TD="bgcolor: #FAFAFA, align: right"]4/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]6/2/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]1[/TD]
[TD="bgcolor: #FAFAFA"]Name L[/TD]

[TD="align: center"]12[/TD]
[TD="bgcolor: #FAFAFA, align: right"]11[/TD]
[TD="bgcolor: #FAFAFA"]Name K[/TD]
[TD="bgcolor: #FAFAFA, align: right"]5/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]7/15/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]1[/TD]
[TD="bgcolor: #FAFAFA"]Name M[/TD]

[TD="align: center"]13[/TD]
[TD="bgcolor: #FAFAFA, align: right"]12[/TD]
[TD="bgcolor: #FAFAFA"]Name L[/TD]
[TD="bgcolor: #FAFAFA, align: right"]6/2/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]8/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]1[/TD]
[TD="bgcolor: #FAFAFA"]Name E[/TD]

[TD="align: center"]14[/TD]
[TD="bgcolor: #FAFAFA, align: right"]13[/TD]
[TD="bgcolor: #FAFAFA"]Name M[/TD]
[TD="bgcolor: #FAFAFA, align: right"]7/15/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]9/1/2017[/TD]
[TD="bgcolor: #FAFAFA, align: right"]1[/TD]
[TD="bgcolor: #FAFAFA"]Name F[/TD]

</tbody>
Sheet27

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]F2[/TH]
[TD="align: left"]{=INDEX($B$2:$B$14,SMALL(IF($C$2:$C$14=SMALL($C$2:$C$14,ROWS($F$2:$F2)),ROW($C$2:$C$14)-ROW($C$2)+1),COUNTIF($D$2:$D2,D2)))}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]



Column D is used in this formula, but not column E. You can shorten the formula a bit if you want to use column E. Replace the COUNTIF at the end with E2:

=INDEX($B$2:$B$14,SMALL(IF($C$2:$C$14=SMALL($C$2:$C$14,ROWS($F$2:$F2)),ROW($C$2:$C$14)-ROW($C$2)+1),E2))
With Control+Shift+Enter
 
Upvote 0
That worked Beautifully! Thank you so much Eric! I really appreciate it.

Cheers!

Best Regards,

KnightFhawker
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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