• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Addition of Hours in Pivot Table

aksalim

New Member
I am not able add hours in Pivot chart. Can someone help me? Attached the file were am working.
 

Attachments

  • Customized Report (18).xlsx
    57.2 KB · Views: 4
Your hours in column I of Sheet1 are text, not numbers. They need converting to numbers. You can do this by putting a formula in cell L3:
=IFERROR(TIMEVALUE(I3),0)
and copy it down as far as needed.
Then you can copy the new column L values, and paste them back into column I using Paste Special, Values. Then format them with the custom format:
[h]:mm
You can delete column L now, although in the attached I've left it in for your information.
Now refresh your pivot.
You will also need to number format the Sum of Hours field in the same way:
59747

59748

59749
 

Attachments

  • Chandoo41552Customized Report (18).xlsx
    59.4 KB · Views: 5
Thank you. But, i am still not able to it myself. The Column I is difference of Column E and G (Time in and time out). It is cumbersome to add an addition dummy column, apply formula, copy the value to column I and then delete the newly created column etc. Cant avoid that?
 
I was quite surprised that Excel managed to correctly interpret strings to do arithmetic on.
Your formula does some interesting things where your original Hours column (I) had '-' (where the Time Out column was showing '00:00'). Some people are in for more than 23 hours.
Perhaps
=MAX(G3-E3,0)
might be of use?
59762
 
Last edited:
aksalim
How that 'system' handle, if misses eg to do 'Logout'?
Those 00:00 would be 'automatic Logout's.
It would be more useful, if both, TimeIn and TimeOut, has also date-information.
... as well as, note, if the 'system' makes something.
 
Back
Top