+ Reply to Thread
Results 1 to 8 of 8

Using Autofilter to Sort Date Range?

  1. #1
    Registered User
    Join Date
    08-13-2007
    Posts
    68

    Using Autofilter to Sort Date Range?

    Hi, I am working with a table of data which I am sorting with auto-filter. Currently I am interested in entries which will occur in February 2008. I have a column of data with the date value which is formatted to read as: 2/4/2008. Is there a way to look at a range of dates (say from 2/1/2008 - 2/28/2008)? Right now I am having to go through and look at the entries on a date by date basis, so the ability to select a data range would be very helpful.

    Thanks for any insight.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Hi,
    for starters don't forget february 2008 has 29 days

    You can use autofilter to view an entire month.
    Choose "Custom" from the drop-down box in the first cell of the date column
    In the first box choose "greater than" and fill in the begin date
    Check " and"
    In the 2nd box choose "smaller than" and fill in the end date in the last box
    OK
    This should do the trick

  3. #3
    Registered User
    Join Date
    08-13-2007
    Posts
    68
    That's right this is a leap year isn't it!

    I had tried using your prescribed method previously, but I am not having any luck. I thought that maybe it wasn't recognizing the date? I have the cells formatted as "date". Is there away to convert the date into a standard number? or would this even help?

  4. #4
    Registered User
    Join Date
    08-13-2007
    Posts
    68
    I'm still trying this and have noticed that I can convert the date to a serial number in a test excel session, but I am working with a BW Query and have not been able to convert the date to serial number within this?

  5. #5
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Hi smlaff,

    Regarding your statement:
    I have a column of data with the date value which is formatted to read as: 2/4/2008.
    It's formatted to read m/d/yyyy, but what is the original format? If it's not a standard date format that Excel would recognize (or the serial number date itself), then searching for a range > and < two dates won't work (as you've found out).

  6. #6
    Registered User
    Join Date
    08-13-2007
    Posts
    68
    By way of using '=Isnumber()' I have determined that the dates being pulled in are text, not numbers. Is there a way to convert, or am I stuck?

  7. #7
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    If your dates are in column A, in another column you can put the formula:

    =DATEVALUE(A1)

    and fill that down as many rows as needed. You should then be able to filter on the calculated column.

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    smlaff01,

    Please read forum rules and message to cross posters below and then add the link to the other forum

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1