+ Reply to Thread
Results 1 to 11 of 11

Use filter to filter last 7 days in a date column

  1. #1
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Use filter to filter last 7 days in a date column

    Is there a custom filter to use to only get the last 7 days? When I use the last week, it gives me this week and last week. I only need the last 7 days. TIA.

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    2007, Office 365
    Posts
    11,702

    Re: Use filter to filter last 7 days in a date column

    Have you tried the option for Top 10? It can be changed to Top 7. As long as dates are sorted ascending this should work.
    Dave

  3. #3
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: Use filter to filter last 7 days in a date column

    No I haven't tried that at all. Not sure how to do that. I would sort ascending, but then how would I only get the last 7 days?

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    2007, Office 365
    Posts
    11,702

    Re: Use filter to filter last 7 days in a date column

    Select a column header. Apply filters ... Data > Filter. Click the drop down arrow over the dates. Since dates are numbers (unless they have been entered as text) there will be an option "Number filters". Click on that. Then click Top 10. You will have the option to change that to Top 7.

    Edit My mistake. They don't have to be sorted ascending. It will return the latest 7 dates without that.
    Last edited by FlameRetired; 09-21-2017 at 11:10 AM.

  5. #5
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: Use filter to filter last 7 days in a date column

    I do not see the top 10 listed. It has a bunch of things listed, but not Top 10. Is there another way to do it?

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    2007, Office 365
    Posts
    11,702

    Re: Use filter to filter last 7 days in a date column

    Triscia, does it have Text filters listed? If so it sounds like your "dates" are text that look like dates. If you are not aware of it dates are numbers starting with day one in 1/1/1900. 9/21/2017 is day 42999 from 1/1/1900.

    In a temporary helper column use the following formula =ISNUMBER(A2) or whatever the first date containing cell is and copy down. If they show FALSE then they are text.

    Use Text to columns in the Data ribbon. Follow the prompts. When you get done the Number filter should show up.

  7. #7
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: Use filter to filter last 7 days in a date column

    No the column is formatted as a date. The selections are equals, before, after, between, tomorrow, today, yesterday, this week, last week, next week, this month, last month, next month, this quarter, last quarter, next quarter, etc. When I select last week, it gives me too much, it goes clear back to 9/11/17.

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    2007, Office 365
    Posts
    11,702

    Re: Use filter to filter last 7 days in a date column

    Aha. I forgot about the date filter.

    If you can temporarily format those dates as General (Ctrl + Shift + ~) they will be numbers and the filter Numbers > Top 10 will be available.

    Once filtered for the last 7 you can format those back to date. I usually keep a date somewhere handy so I can restore the dates with format painter.

    Sorry about the oversight.

  9. #9
    Forum Expert sandy666's Avatar
    Join Date
    02-05-2015
    Location
    Any Country
    MS-Off Ver
    farerwell
    Posts
    8,749

    Re: Use filter to filter last 7 days in a date column

    you can try create PivotTable then : TopTen together with postú8
    sandy
    How to create an editor for Power Query with Notepad++ (tutorial)
    How to create timeline project with vertical today marker (2010, 2013, 2016 etc...) (examples)
    Tips for Excellent Spreadsheets

    What makes learning so hard is the amount of knowledge you have to unlearn
    Why is my program not doing what I expect?
    Because you set the wrong expectations. Rewire your brain

  10. #10
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: Use filter to filter last 7 days in a date column

    but it only gives me 7 items. There are more than 7 rows that are within the last 7 days.

  11. #11
    Forum Expert sandy666's Avatar
    Join Date
    02-05-2015
    Location
    Any Country
    MS-Off Ver
    farerwell
    Posts
    8,749

    Re: Use filter to filter last 7 days in a date column

    Attach a sample workbook (not a picture). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

    Add description what you want to achieve

+ 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. macro to filter to a date 2 or 3 days ago
    By Newsome79 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2016, 10:42 AM
  2. VBA to filter from today's date + 4 business days
    By kop1ko in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-19-2016, 07:20 AM
  3. vba to filter table by today's date up to 10 days. and save as new version
    By The Fly in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-01-2014, 02:15 PM
  4. [SOLVED] How to set a 'Date Filter' on a field in the 'Report Filter' section of a Pivot Table?
    By Rhino_dance in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 03-28-2013, 11:01 AM
  5. Replies: 9
    Last Post: 01-04-2013, 09:56 AM
  6. Filter several pivot tables by one programmed date range filter in Excel 2003
    By olewka in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2011, 11:49 AM
  7. Great Combo Filter/Search form, cant get DATE filter to integrate. HELP
    By fau5tu5 in forum Access Programming / VBA / Macros
    Replies: 4
    Last Post: 05-18-2009, 05:05 PM

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