Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 124
Default Sorting by month and year and ignoring the day

I often need to sort a worksheet by month first then by one or two other
columns, my problem is that excel takes the day of the month into account. Is
it possible to do this sort only by the month and year only and ignoring the
day of the month? BTW I would prefer not using a pivot table.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Sorting by month and year and ignoring the day

It sorts by year first, then month and finally by day, you could use 2 help
columns
assume the list starts in A2

in B2 put


=YEAR(A2)

In C2 put


=MONTH(A2)


Select both cells and copy down as long as needed

select all 3 columns and select the order you want to sort by

--


Regards,


Peo Sjoblom




"Charles" wrote in message
...
I often need to sort a worksheet by month first then by one or two other
columns, my problem is that excel takes the day of the month into account.
Is
it possible to do this sort only by the month and year only and ignoring
the
day of the month? BTW I would prefer not using a pivot table.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Sorting by month and year and ignoring the day

I'd use a helper column with a formula like:

=text(a1,"mm-yyyy")
or
=text(a1,"yyyy-mm")

sort by month then year (or by year, then month???).

Charles wrote:

I often need to sort a worksheet by month first then by one or two other
columns, my problem is that excel takes the day of the month into account. Is
it possible to do this sort only by the month and year only and ignoring the
day of the month? BTW I would prefer not using a pivot table.


--

Dave Peterson
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
Sorting date fields by month excluding year Alisa Excel Discussion (Misc queries) 1 July 25th 07 09:10 PM
Sorting dates by month instead of year MMangen Excel Worksheet Functions 5 December 19th 06 09:08 PM
trying to get day/month/year froamt while user enters year only RADIOOZ New Users to Excel 3 June 7th 06 05:30 AM
Sorting by month, disregarding the year Soffi Excel Discussion (Misc queries) 3 September 26th 05 07:52 PM
How to sort by day and month while ignoring year? Robert Judge Excel Worksheet Functions 4 December 23rd 04 11:37 PM


All times are GMT +1. The time now is 01:12 PM.

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

About Us

"It's about Microsoft Excel"