+ Reply to Thread
Results 1 to 5 of 5

Getpivotdata for a date range criteria

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    37

    Getpivotdata for a date range criteria

    Hi there

    Suppose I have a pivot table with two columns, date and volume. I want to get the total volume for a date range (ie. a week) with getpivotdata like

    =getpivotdata("Volume",$A$1, "Date","1/7/2013 - 1/7/2013 +6")

    How can I get it to work?


    Thank you.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Getpivotdata for a date range criteria

    perhaps
    =SUMPRODUCT(IFERROR(GETPIVOTDATA("Volume",$A$1,"Date",DATE(2013,7,1)+{0,1,2,3,4,5}),0))
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    01-10-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Getpivotdata for a date range criteria

    Thank you, JosephP. That works brilliantly!

    What if the date range is a lot longer and presented like

    1/7/2013 - 25/9/2013

    How can I present the array for the sumproduct function?

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Getpivotdata for a date range criteria

    assume your dates are in cells g3 and g4

    =SUMPRODUCT(IFERROR(GETPIVOTDATA("Volume",$A$1,"Date",ROW(INDIRECT(G3&":"&G4))),0))

    this must be array-entered using ctrl+shift+enter

  5. #5
    Registered User
    Join Date
    01-10-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Getpivotdata for a date range criteria

    Thank you very much! This will make things a lot easier.

+ 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. [SOLVED] find missing date on every group date list based on range and criteria
    By k1dr0ck in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-25-2013, 01:26 AM
  2. [SOLVED] GetPivotData with 2 criteria
    By Maroota in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-29-2012, 08:40 AM
  3. SumIf using date criteria range and one other criteria
    By DJTMONEY in forum Excel General
    Replies: 1
    Last Post: 04-20-2010, 04:10 PM
  4. Using a date range as criteria
    By BigFish in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-19-2009, 09:02 PM
  5. Cell Reference as criteria in GETPIVOTDATA
    By manny_cb in forum Excel General
    Replies: 3
    Last Post: 06-16-2008, 10:22 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