Sorting by date.

PACKERS

New Member
Hello,

The info below is a portion of dates that I am trying to sort:

November 6, 1954
January 8, 1958
January 17, 1959
March 29, 1963
January 2, 1965
January 29, 1965
May 20, 1966

<colgroup><col></colgroup><tbody>
</tbody>

It is one cell per date. I would like it to sort by month and day, so that all January will be in order from Jan 01 to Jan 31, regardless of year. I know I could split the month and day into one cell and the year into a separate cell, but that would be a lot of work.

Thanks for any help!!
 

CalcSux78

Well-known Member
I was able to sort as requested in 2 minutes using a column that I could hide.
<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #BBB"><colgroup><col width="25px" style="background-color: #DAE7F5" /><col /><col /></colgroup><thead><tr style=" background-color: #DAE7F5;text-align: center;color: #161120"><th></th><th>A</th><th>B</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style=";">Dates</td><td style=";">Cust Date</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="text-align: right;;">January 2, 1965</td><td style="text-align: right;;">January 2, 2015</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="text-align: right;;">January 8, 1958</td><td style="text-align: right;;">January 8, 2015</td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style="text-align: right;;">January 17, 1959</td><td style="text-align: right;;">January 17, 2015</td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style="text-align: right;;">January 29, 1965</td><td style="text-align: right;;">January 29, 2015</td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style="text-align: right;;">March 29, 1963</td><td style="text-align: right;;">March 29, 2015</td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style="text-align: right;;">May 20, 1966</td><td style="text-align: right;;">May 20, 2015</td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style="text-align: right;;">November 6, 1954</td><td style="text-align: right;;">November 6, 2015</td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #BBB;border-top:none;text-align: center;background-color: #DAE7F5;color: #161120">Sheet1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">B2</th><td style="text-align:left">=DATE(<font color="Blue">YEAR(<font color="Red">NOW(<font color="Green"></font>)</font>),MONTH(<font color="Red">[@Dates]</font>),DAY(<font color="Red">[@Dates]</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">B3</th><td style="text-align:left">=DATE(<font color="Blue">YEAR(<font color="Red">NOW(<font color="Green"></font>)</font>),MONTH(<font color="Red">[@Dates]</font>),DAY(<font color="Red">[@Dates]</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">B4</th><td style="text-align:left">=DATE(<font color="Blue">YEAR(<font color="Red">NOW(<font color="Green"></font>)</font>),MONTH(<font color="Red">[@Dates]</font>),DAY(<font color="Red">[@Dates]</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">B5</th><td style="text-align:left">=DATE(<font color="Blue">YEAR(<font color="Red">NOW(<font color="Green"></font>)</font>),MONTH(<font color="Red">[@Dates]</font>),DAY(<font color="Red">[@Dates]</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">B6</th><td style="text-align:left">=DATE(<font color="Blue">YEAR(<font color="Red">NOW(<font color="Green"></font>)</font>),MONTH(<font color="Red">[@Dates]</font>),DAY(<font color="Red">[@Dates]</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">B7</th><td style="text-align:left">=DATE(<font color="Blue">YEAR(<font color="Red">NOW(<font color="Green"></font>)</font>),MONTH(<font color="Red">[@Dates]</font>),DAY(<font color="Red">[@Dates]</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">B8</th><td style="text-align:left">=DATE(<font color="Blue">YEAR(<font color="Red">NOW(<font color="Green"></font>)</font>),MONTH(<font color="Red">[@Dates]</font>),DAY(<font color="Red">[@Dates]</font>)</font>)</td></tr></tbody></table></td></tr></table><br />
When complete, I sorted the Cust Date column oldest to newest.
 

davesexcel

Well-known Member
Have a separate column and use for example.
B1=month(A1)
and drag the formula down, then sort by column B
 

Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Macro to copy values across rows and transposing them and add the user id
    [FONT=Times New Roman][SIZE=3][COLOR=#000000][/COLOR][/SIZE][/FONT][FONT=Calibri][SIZE=3][COLOR=#000000]Hi,[/COLOR][/SIZE][/FONT] [FONT=Times New...
Top