+ Reply to Thread
Results 1 to 7 of 7

getting the date/time value from Pivot table data source

  1. #1
    Forum Contributor
    Join Date
    09-05-2019
    Location
    Vancouver, Canada
    MS-Off Ver
    Office 365
    Posts
    101

    getting the date/time value from Pivot table data source

    Hello everybody

    I have a data source with date/time and different values.

    An example of the data I have is the following:

    3/3/2019 11:15 | 23.3
    3/3/2019 11:30 | 23.5
    3/3/2019 11:45 | 24.5
    ...

    The pivot table I already created for the different days has the maximum value for 3/3/2019 (let's say it was 24.5).

    How would I be able to retrieve the date associated with the maximum value (in the example, I would like the value "3/3/2019 11:45").

    FYI, I also have multiple columns with similar information in which I which the data retrieval needs to work as well, not just 1 column worth of data.

    Thanks for your help
    Attached Files Attached Files
    Last edited by dcwan; 09-09-2019 at 05:55 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,736

    Re: getting the date/time value from Pivot table data source

    Hi, welcome to the forum

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    09-05-2019
    Location
    Vancouver, Canada
    MS-Off Ver
    Office 365
    Posts
    101

    Re: getting the date/time value from Pivot table data source

    I have attached a sample workbook with two tabs, "rawdata" and "Pivot Table", being the relevant one. The desired outcomes of what I would like to see is in the "Pivot Table" tab.

    Thanks
    Attached Files Attached Files
    Last edited by dcwan; 09-12-2019 at 10:03 PM.

  4. #4
    Forum Contributor
    Join Date
    09-05-2019
    Location
    Vancouver, Canada
    MS-Off Ver
    Office 365
    Posts
    101

    Re: getting the date/time value from Pivot table data source

    I don't want to repost this, but nobody has answered this in a while. I'm trying to solve this without any success so far.

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    16,814

    Re: getting the date/time value from Pivot table data source

    See if the following does what you want:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Forum Contributor
    Join Date
    09-05-2019
    Location
    Vancouver, Canada
    MS-Off Ver
    Office 365
    Posts
    101

    Re: getting the date/time value from Pivot table data source

    Hello Jete

    I tried out your formula, but I was wondering whether it is possible to substitute some of the parameters with the name manager. In my Excel post that I attached, I substituted the parameters with Excel named references, and it no longer works as it should.

    I'm having a bunch of dynamic named references because I have an "infinite" range. I have noticed that you used a fixed value, such as "ROW($A$2:$A$673)". Since I have an "infinite range" from my dynamic ranges, a fixed range will not work.

    Thanks for your help

    Thanks
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    16,814

    Re: getting the date/time value from Pivot table data source

    There are #REF! errors in the refers to of each of the named ranges.
    The #REF! errors need to be replaced with cell values. For example airtemp1 should have a refers to that reads: =OFFSET(rawdata!B$1,0,0,COUNTA(rawdata!$A:$A)-1,1)
    Once that is accomplished then the formula may be changed to read: =IF(ISERROR(VALUE(LEFT($A2,1))),"",MOD(INDEX(date,AGGREGATE(15,6,ROW(date)/(airtemp1=B2)/(TEXT(date,"d-mmm")=$A2),1)),1))
    Let us know if you have any questions.
    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. Replies: 7
    Last Post: 06-19-2017, 06:10 PM
  2. Replies: 2
    Last Post: 03-24-2016, 11:49 PM
  3. Replies: 9
    Last Post: 02-15-2015, 07:32 PM
  4. Replies: 3
    Last Post: 12-19-2013, 06:49 AM
  5. Calculation of time difference between the Start date & time & End Date & time
    By Harry Jones in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-17-2012, 03:54 PM
  6. Calculating days & time left from start date/time to end date/time
    By marie in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-07-2005, 10:40 AM
  7. Replies: 0
    Last Post: 08-28-2005, 10:35 AM

Tags for this Thread

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