?
Solved

excel 2007 sort date by month

Posted on 2011-09-27
4
Medium Priority
?
257 Views
Last Modified: 2012-08-14
Hi There I have huge amount of data for the last 5 months

I have sorted data on submit date desc . Now I have to select data for the last 4 months from here.

IThe date format is mm/dd/yyy hh:mm:SS AM?PM

Now I tried creating a new coulmn called monthsort and used the formula Month(A2)  expecting to see the month number there.

I donot see that instead I see a  date of 01/01/1900

How would you do this.

Any help is appreciated.

YRKS
0
Comment
Question by:SMadhavi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 1600 total points
ID: 36712605
Hello YRKS

I think you can do it that way - you just have a formatting issue. In the cell with the formula

=MONTH(A2)

just format that cell as general, then you'll see the month, i.e. 1....you currently have it formatted as a date...

regards, barry
0
 
LVL 9

Assisted Solution

by:jsdray
jsdray earned 400 total points
ID: 36712639
just need to reformat the new column with general... not date
0
 
LVL 9

Expert Comment

by:jsdray
ID: 36712646
sorry..barry...didn't see you there
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 36712805
No problem jsdray....

Thinking about it a bit more, YRKS, I'm not even sure you need an extra column (and using the month might not work too well when you want the last 4 months in February because you'll need 1,2, 1, and 12)

Can't you just sort by the description you want and then by the date/time field (descending)? Dates will sort like numbers (assuming they are real dates -not text).

regards, barry
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question