Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Sort Date Column
I have a date column in the yyyy-mm-dd format. I want the user to be able to
sort the worksheet by month. Is there a way I can pull only the month from the date field and allow the user to sort on that and have the worksheet display all rows that fall within that month. Example May - all columns with a date of 2009-05-01 through 2009-05-31 would display. PS - I am running Excel 2002 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Sort Date Column
With data as wuch; if you do the normal sort what happens?
If this post helps click Yes --------------- Jacob Skaria "CAL" wrote: I have a date column in the yyyy-mm-dd format. I want the user to be able to sort the worksheet by month. Is there a way I can pull only the month from the date field and allow the user to sort on that and have the worksheet display all rows that fall within that month. Example May - all columns with a date of 2009-05-01 through 2009-05-31 would display. PS - I am running Excel 2002 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Sort Date Column
Hi Cal,
use a helper column and fill it with values extracted either by MONTH () - if your date column values are in date format, or by FIND(), MID () - if values are in text/string format. You can hide the helper column and use a suitable control element for switching between ascending/descending sorting. HTH, have a nice day Michael CAL wrote: I have a date column in the yyyy-mm-dd format. I want the user to be able to sort the worksheet by month. Is there a way I can pull only the month from the date field and allow the user to sort on that and have the worksheet display all rows that fall within that month. Example May - all columns with a date of 2009-05-01 through 2009-05-31 would display. PS - I am running Excel 2002 |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Sort Date Column
Hi,
Try this 1. Select the date column and go to Format cells (Ctrl+1). In Number Category Custom Type enter mmmm. Instead of dates, all months will appear. 2. Now select the range once again (including the header row) and go to Sort Options. In the drop down select January, February, March 3. Select ascending order 4. All the dates will now be sorted by month 5. Select the date column and go to Format cells (Ctrl+1). In Number Category Custom Type enter dd-mm-yyyy. Instead of months, all dates will appear sorted by month Hope this helps. -- Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com "CAL" wrote in message ... I have a date column in the yyyy-mm-dd format. I want the user to be able to sort the worksheet by month. Is there a way I can pull only the month from the date field and allow the user to sort on that and have the worksheet display all rows that fall within that month. Example May - all columns with a date of 2009-05-01 through 2009-05-31 would display. PS - I am running Excel 2002 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto-sort worksheet by date in column A | Excel Discussion (Misc queries) | |||
Sort imported date column | Excel Discussion (Misc queries) | |||
After I sort a column can I add the date to separate worksheets? | Excel Discussion (Misc queries) | |||
how to sort a column containing date of birth? | Excel Discussion (Misc queries) | |||
sort column in date order dd/mm/yy | Excel Discussion (Misc queries) |