+ Reply to Thread
Results 1 to 11 of 11

Cell formatting issue for time spent

  1. #1
    Registered User
    Join Date
    07-30-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2010
    Posts
    8

    Cell formatting issue for time spent

    So we have a new ticketing system and have been trying to recreate the reports that we previously had in the old system. One of the metrics we are trying to capture is how long a technician spent on tickets on average. Unfortunately the new ticketing system gives us the following format for total time worked: "5 hr(s) 03 min(s)". I'm not sure how to work with or 'fix' this format so I can calculate and get averages etc... Any idea how to format this output better so I can actually use it? Hopefully I've explained this properly. The combination of numbers and letters in this is making formatting a nightmare. Any ideas?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Cell formatting issue for time spent

    If it is indeed a proper time number then you can format it any way you want. What do you get if you test the cell with
    =ISNUMBER(A1)
    where A1 contains the time worked. If you get TRUE then it is a number. Anything else then it's text and will need string slicing to reconfigure as a proper time number that you can work with.

    Upload the workbook (or at least the relevant part of it) so that we can see the problem in context.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,755

    Re: Cell formatting issue for time spent

    you have 03 but not a zero in front of the 5
    i suspect you will need to extract the numbers and then use if a time formula

    is it exactly as formatted ? in text?

    time(hours(),minutes(),seconds())

    we could use find/search to find the H and extract the hours using LEFT() and then also ise the same info to extract the mins

    would that work ...
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    07-30-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Cell formatting issue for time spent

    Excel Forum Example.xlsx
    Quote Originally Posted by Richard Buttrey View Post
    If it is indeed a proper time number then you can format it any way you want. What do you get if you test the cell with
    =ISNUMBER(A1)
    where A1 contains the time worked. If you get TRUE then it is a number. Anything else then it's text and will need string slicing to reconfigure as a proper time number that you can work with.

    Upload the workbook (or at least the relevant part of it) so that we can see the problem in context.
    Thanks for the quick reply Richard. I tried the formula you suggested and it returned FALSE unfortunately. Enclosed is sample of the workbook I'm talking about.

  5. #5
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,296

    Re: Cell formatting issue for time spent

    Please Login or Register  to view this content.
    Try this one
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,450

    Re: Cell formatting issue for time spent

    Another way
    Please Login or Register  to view this content.
    and format as needed
    Last edited by Pepe Le Mokko; 08-05-2013 at 02:44 PM.

  7. #7
    Registered User
    Join Date
    07-30-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Cell formatting issue for time spent

    Quote Originally Posted by Pepe Le Mokko View Post
    Your sample sheet gives dates in times in standard format. I fail to see the problem ?
    The column in question is the "Total Time Worked" column which doesn't give dates and times in a standard format.

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,450

    Re: Cell formatting issue for time spent

    Quote Originally Posted by Michael Perry View Post
    The column in question is the "Total Time Worked" column which doesn't give dates and times in a standard format.
    Yes sorry, I was looking in the wrong place and corrected post #6 accordingly

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Cell formatting issue for time spent

    Hi,

    Another way

    =LEFT(Q2,FIND(" ",Q2))/24+VALUE(MID(Q2,LEN(Q2)-8,2))/1440

  10. #10
    Registered User
    Join Date
    07-30-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Cell formatting issue for time spent

    Sorry I'm just now getting back to this guys, I got swamped yesterday afternoon. You guys rock, all of the solutions proposed work well enough for me to use the output as real numbers. Thanks so much!

  11. #11
    Registered User
    Join Date
    07-30-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Cell formatting issue for time spent

    Hey all, I had a follow up question to this. I formatted the cells to "h:mm" and used the suggested formula "=SUBSTITUTE(SUBSTITUTE(Q2,"hr(s)",":"),"min(s)","")+0". This took the input of "4 hr(s) 09 min(s)" and changed the output to 4:09.
    I then I used use the average formula in Excel to give the average hours worked. Would this give me the correct data or would the format or formula used need to be different in some way? Thanks guys!

+ 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. How much time have you spent answering questions?
    By MarvinP in forum The Water Cooler
    Replies: 7
    Last Post: 08-22-2012, 06:47 AM
  2. Time Tracker - I need a macro that calculates the time spent on an activity
    By amark in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2011, 09:55 AM
  3. % Of Time Spent Over A Week...
    By iAaron in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 10-21-2007, 02:45 PM
  4. [SOLVED] How can I show time spent?
    By L in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-08-2006, 10:13 AM
  5. Measure time spent
    By bill_s1416 in forum Excel General
    Replies: 0
    Last Post: 03-04-2005, 12:36 PM

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