Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kat Kat is offline
external usenet poster
 
Posts: 56
Default Sort by Date Function

I want to sort a list of employees birthdates but I only want to sort them by
month then date not year. When I do a sort function it will sort by the
year. Does anyone know how to have it sort the other way.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,081
Default Sort by Date Function

Insert a new column next to the actual birthdays - let's say they are in
column B, and you insert a new column C, and assume the dates commence in row
2. Use this formula in the new column C, row 2, then copy it down as needed,
then sort on the new column

=date(year(today()),month(b2),day(b2))

However, that may generate birthdays in 2007 but earlier than today, so you
may want to use

=if(date(year(today()),month(b2),day(b2))<today(), date(year(today())+1,month(b2),day(b2)),date(year( today()),month(b2),day(b2)))






"Kat" wrote:

I want to sort a list of employees birthdates but I only want to sort them by
month then date not year. When I do a sort function it will sort by the
year. Does anyone know how to have it sort the other way.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Sort by Date Function

Assume employee birthdates in column B
Create helper columns in C & D

In C2: =MONTH(B2)
In D2: =DAY(B2)
select both C2 & D2 copy down

Select column B,C, and D
Sort by column C, then Column D


"Kat" wrote:

I want to sort a list of employees birthdates but I only want to sort them by
month then date not year. When I do a sort function it will sort by the
year. Does anyone know how to have it sort the other way.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Sort by Date Function

Assuming dates are in column A.

In B1 enter =MONTH(A1) then double-click on fill handle of B1.

Sort on column B


Gord Dibben MS Excel MVP

On Thu, 30 Aug 2007 09:16:06 -0700, Kat wrote:

I want to sort a list of employees birthdates but I only want to sort them by
month then date not year. When I do a sort function it will sort by the
year. Does anyone know how to have it sort the other way.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort : how can I use a variable in a VB sort function? El Bee Excel Worksheet Functions 3 February 16th 06 09:34 PM
sort function to sort for bell curve Kuby Excel Discussion (Misc queries) 4 December 16th 05 06:51 PM
Complicated sort function with sort and sum Matz Excel Worksheet Functions 3 August 29th 05 07:50 AM
In Excel, why sort function fails when applied to a list of date? Excel heavy user Excel Discussion (Misc queries) 1 January 18th 05 06:37 PM
Excel Sort function should not sort the cell formatting! Lisa D.N.1 Excel Worksheet Functions 1 December 28th 04 08:37 PM


All times are GMT +1. The time now is 10:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"