+ Reply to Thread
Results 1 to 13 of 13

Formatting a time difference to work in a pivot table

  1. #1
    Registered User
    Join Date
    12-27-2013
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2003
    Posts
    49

    Formatting a time difference to work in a pivot table

    OK.... I'm calculating the delay in a patient receiving a certain procedure at my facility. From my spreadsheet I have arrival time, and procedure time, and I've formatted my "delay" box as =(d2-c2)

    Easy

    Now I need a Pivot table to highlight this data per pt visit by month, so I create a pivot table, but when I try to place my "delay" into the pivot table it inserts a time (12:01:00 AM) instead of a count of minutes ( 0:01). My delay colum is formatted as custom (hh:mm).

    Is there a way within the pivot table to change the number formatting, or have I missed something else?

    Sorry I can't share my spreadsheet. HIPPA
    Last edited by dan_fash; 08-22-2014 at 08:59 AM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Formatting a time difference to work in a pivot table

    Try

    =TEXT(D2-C2,"0")

    though that will make it text
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formatting a time difference to work in a pivot table

    you can also format the cells in the pivot table.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Registered User
    Join Date
    12-27-2013
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Formatting a time difference to work in a pivot table

    If I try =TEXT(D2-C2,"0") if fills in the title of my column (arrival time, test performed) instead of the times from the cells

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formatting a time difference to work in a pivot table

    Post a (small) excel file, without confidential information.

    Please also add (manualy) the desired result.

  6. #6
    Registered User
    Join Date
    12-27-2013
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Formatting a time difference to work in a pivot table

    pivot table test.xlsx

    I think that worked..

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formatting a time difference to work in a pivot table

    See the attached file.

    I was able to change the data in the row, to get the result you asked for.

    I made this in excel 2003 (but that should not make any differance).
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    12-27-2013
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Formatting a time difference to work in a pivot table

    did you make the change to the column in the data table, or within the cells of the pivot table?

  9. #9
    Registered User
    Join Date
    12-27-2013
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Formatting a time difference to work in a pivot table

    is there a simple way to convert a time to a specific number, so that in my spread sheet instead of showing 0:03 for a delay, I could just have it say 3 (minutes)?

  10. #10
    Registered User
    Join Date
    12-27-2013
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Formatting a time difference to work in a pivot table

    I attempted to do that with vlookup, but it doesnt read the 0:03 as 0:03, it seems to read it as 12:03:00 AM

  11. #11
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formatting a time difference to work in a pivot table

    did you make the change to the column in the data table, or within the cells of the pivot table?

    within the cells of the pivot table.

    and to the other question.

    if you add the cellformat in the data table on mm:ss (instead of hh:mm) you will get the minutes in the data table.

    Of course you can do the same into the pivot table.
    Last edited by oeldere; 08-22-2014 at 10:13 AM. Reason: and to the other question

  12. #12
    Registered User
    Join Date
    12-27-2013
    Location
    Oklahoma City
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: Formatting a time difference to work in a pivot table

    Cool, thanks

  13. #13
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formatting a time difference to work in a pivot table

    thanks for the reply.

    glad i could help.

    if your question is closed will you mark it closed.

+ 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. Conditional formatting applied to a pivot table doesn't work as it should
    By Pichingualas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-14-2012, 07:43 AM
  2. Pivot Table Logon/Logout Time Difference
    By MMcGuinness in forum Excel General
    Replies: 0
    Last Post: 08-31-2011, 07:28 AM
  3. Var difference on Pivot table
    By gico1972 in forum Excel General
    Replies: 5
    Last Post: 12-21-2010, 01:10 PM
  4. Excel 2007 : Time Formatting and getting a % difference
    By jesz1987 in forum Excel General
    Replies: 4
    Last Post: 12-16-2010, 05:51 AM
  5. Time Difference and Pivot Grouping
    By hmahdi in forum Excel General
    Replies: 6
    Last Post: 04-21-2010, 09:19 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