+ Reply to Thread
Results 1 to 5 of 5

Select date range in multiple Pivots

  1. #1
    Registered User
    Join Date
    01-11-2010
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    23

    Select date range in multiple Pivots

    Hi,
    I'd like to select the start date & end date for multiple Pivots (on one sheet).
    Expl. if I put in a date in the "Start Date" cell : 01/01/2010 and another date in the "End Date" cell : 15/01/2010. Then all the pivots on the sheet should only show the date between 01/01 and 15/01/2010.
    The dates in the pivots are under column "Date".
    I have a code but it only selects 1 pivot and it doesn't refresh the pivots when you change the dates selection...
    Could you help me ?

    Please Login or Register  to view this content.
    Last edited by BartDeHertogh; 01-20-2010 at 06:22 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Select date range in multiple Pivots

    A sample file might help here...

    Is Date a Row Field or Page Field ?

    The narrative would imply Row Field but use of EnableMultiPageItems is confusing on that basis
    (also MultiPageItem functionality and item visibility process will vary between pre and post XL2007 versions - or at least I seem to recall that being the case)

    In the meantime perhaps the below will help ?
    Note: I assumed Pivots contained on a sheet called PIVOTTABLES - alter this name per your own file.

    Please Login or Register  to view this content.
    It would of course make sense to invoke the above from the Worksheet_Change event as and when either of StartDate/EndDate values are altered...
    Last edited by DonkeyOte; 01-20-2010 at 06:05 AM.

  3. #3
    Registered User
    Join Date
    01-11-2010
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Select date range in multiple Pivots

    Hi DO,
    You're spot on !!!
    Your code works perfectly (also in XL2003) & the way I needed it.
    Many thanks for your help !
    Greetz B.

  4. #4
    Registered User
    Join Date
    05-30-2012
    Location
    Delhi, India
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Select date range in multiple Pivots

    Hello

    I have a kind of similar problem, for which I am using the below code, becasue I dont need to select date range for all Pivots, but only for one pivot. May be you can advice me what change required in your script only, as my script and your script gives the same result but my script shows a debug error.
    The problem is that, date ranges that I want are getting selected, but it is also selecting few other dates as well, dont know whay. please help.

    Please Login or Register  to view this content.
    Last edited by arlu1201; 06-27-2012 at 03:55 AM. Reason: Use code tags in future.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Select date range in multiple Pivots

    Gaura,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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