Solved

excel 2007 sort date by month

Posted on 2011-09-27
4
237 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
  • 2
  • 2
4 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 400 total points
Comment Utility
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 100 total points
Comment Utility
just need to reformat the new column with general... not date
0
 
LVL 9

Expert Comment

by:jsdray
Comment Utility
sorry..barry...didn't see you there
0
 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now