+ Reply to Thread
Results 1 to 4 of 4

Advanced filter by date range, international date format problem

  1. #1
    Registered User
    Join Date
    08-12-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    11

    Advanced filter by date range, international date format problem

    Hi

    I am trying to make a spreadsheet to track patients in a surgical unit.

    Every patient entered will have a category assigned (from a drop-down list) and a date of surgery.

    I have created an Advanced Filter which I want to display entries on a separate worksheet. I want to be able to display all patients of a particular category (eg. Trauma) who had surgery within a certain date range.

    I know I can do this with an AutoFilter, but want it to be more straightforward for staff to use by just entering the start and end dates into the Criteria cells for the Advanced Filter. I have the Advanced filter working, and have made it auto-refresh whenever the criteria are modified.

    The problem I have is that the dates are being interpreted as a mm/dd/yyyy format, whereas I want to enter them as dd/mm/yyyy format.

    I have tried formatting the cells that the date criteria are entered into as "Date" of dd/mm/yyyy format, but it still interprets the dates as mm/dd/yyyy (ie. Interprets 10/08/2013 as 8th October, instead of 10th August).

    Is there a way I can ensure the Advanced Filter knows what date format I'm using?

    Thanks!
    Brent

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Advanced filter by date range, international date format problem

    Brent

    How are you applying the advanced filter?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-12-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Advanced filter by date range, international date format problem

    Hi Norie

    Thanks for your reply.

    I have all of my data on one worksheet. On a separate worksheet I have the criteria for the Advanced filter. The criteria are "Date" (for start date), "Date" (for end date), and "Category". The advanced filter results are displayed on the worksheet with the criteria (not filtered in place on the main worksheet)

    I enter the criteria all on one row so that all criteria must be met. Ie. >start date AND <end date AND category. In category I have entered ="=Facial Trauma"

    Everything is working fine, except the date filtering is interpreting the dates as US format, so my results aren't correct. Other parts of this spreadsheet are using dates, and are working as dd/mm/yyyy format (which is the windows system format on my computer).

    Basically, I need to know how to make the advanced filter recognise the dates are given as dd/mm/yyyy not mm/dd/yyyy.

    Thanks!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Advanced filter by date range, international date format problem

    Hi and welcome to the forum

    A date in excel is a 5-digit number representing how many days have elapsed since 1/1/1900. So to display a date in a different way, formatting will work for this, because all formatting does is change the cosmetic appearance of the cell, it does not affect the contents.

    If formatting is not changing the way your date appears, then your "date" is probably not a date, but text that just looks like a date - test with =isnumber(cell-ref)...FALSE indicates text

    If the date is in fact text, you will need to convert it back to a date, and how you do that depends on what the "date" looks like
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. International Property - Date format
    By Nikhilgupta in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-30-2013, 07:43 AM
  2. Date Advanced Filter Problem
    By abubader in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-04-2013, 07:50 AM
  3. Date Advanced Filter Problem
    By abubader in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2013, 04:08 AM
  4. Advanced filter date problem
    By pdmkh in forum Excel General
    Replies: 14
    Last Post: 01-18-2011, 04:55 AM
  5. Advanced filter a dynamic date range
    By oneandoneis2 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-06-2006, 03:57 AM

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