Results 1 to 5 of 5

Thread: how to filter all dates between two dates

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,888
    If your 'database' is a table then you can use a slicer (unfortunately not a Time Slicer); click on the first date, hold the shift key down and click on the second date.[Sheet4 cell G1]
    Lower down on the sheet I've added a pivot table and a Time Slicer where you can do it in one click: click and drag the days you want to filter for. This pivot table works like a plain filter because there is a unique column of data at the left of the pivot, otherwise it would do what pivot tables are good at which is summarising/aggregating/grouping data rows.[Sheet4 cell E45]
    Using VBA, on Sheet2 click on one date then another date in column C and it will filter between those two dates. Keep on clicking (in pairs of clicks) to filter again. You will at one point have to clear the filter to see the dates again. You can click the dates in any order (earlier date/later date). The code is in Sheet2's code-module.
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

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