+ Reply to Thread
Results 1 to 1 of 1

VBA for filtering dates in a Pivot Table Round 2

  1. #1
    Registered User
    Join Date
    05-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    21

    VBA for filtering dates in a Pivot Table Round 2

    This is a semi-re-post so will apologize in advance.

    I am trying to write code that will filter on a specific date range in a pivot table using my "date" filter (requester insists on a pivot table).
    Example, I ran a daily report today and I want to show dates for the current week (mon-wed) without having to manually select them.
    I have looked at multiple postings across other forums and the coding just seems too complicated.

    Have attached a sample file of what is needed for my work.
    -In Column B10 has the date filter. I need some sort of VBA code/macro to select dates based on current day of the report.
    -Example: today is 8/13. I need the report to show the previous two days (8/11 and 8/12.)
    -Tomorrow will need to show 8/11, 8/12 and so forth. Come the following Monday the whole process will be reset.

    Something like this:
    If weekday(Date) = 3 then
    PivotDate between Date()-2 and Date()-1

    Just do not know how to translate that into VBA.
    Attached Files Attached Files

+ 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. VBA for filtering dates in a Pivot Table
    By PhatRam32 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-18-2013, 10:26 PM
  2. [SOLVED] Filtering Data Pivot Table is Based On - Impact on Pivot Table
    By bbg22 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-17-2013, 06:34 AM
  3. Help filtering a pivot table for certain dates.
    By jcranst in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2013, 03:53 PM
  4. Filtering a Pivot Table for Between Two Dates
    By shichao in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-29-2013, 04:30 PM
  5. Filtering a Pivot Table according to 'Future' Pivot Items
    By Eraserhead in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2012, 03:25 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