+ Reply to Thread
Results 1 to 8 of 8

Calculating average wait time across time intervals

Hybrid View

  1. #1
    Registered User
    Join Date
    11-10-2015
    Location
    SINGAPORE
    MS-Off Ver
    2007
    Posts
    16

    Calculating average wait time across time intervals

    Hi I encountered a problem. I work in a clinic. Basically I have 2 columns of data. 1 column states the time of arrival of patients while the other states the respective waiting time the patients have to go through before they get to be examined by the doctor. I want to plot a Barchart/histogram that shows for every half hour interval from 8am to 5pm during which the patient arrives at the clinic, the average time they have to wait. So for example 5 patients arrive at the clinic at a time between 0800-0830, the y axis of the bar chart from 0800-0830 will show the average waiting time of these 5 patients. Can this be done please? Thank you!

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,915

    Re: Calculating average wait time across time intervals

    You could create a table from your data that averages out the waiting times for each time slot, as per the attached.
    The yellow area is the table I refer to above and the chart is driven by that.

    BSB
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-10-2015
    Location
    SINGAPORE
    MS-Off Ver
    2007
    Posts
    16

    Re: Calculating average wait time across time intervals

    hi ignore post #4 please thanks
    Last edited by rjng90; 04-16-2016 at 01:39 AM.

  4. #4
    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
    53,048

    Re: Calculating average wait time across time intervals

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    http://www.mrexcel.com/forum/excel-q...intervals.html
    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

  5. #5
    Registered User
    Join Date
    11-10-2015
    Location
    SINGAPORE
    MS-Off Ver
    2007
    Posts
    16

    Re: Calculating average wait time across time intervals

    Hi I posted the same thread to these 2 other websites too so please take them as repetition please!

    http://www.excelguru.ca/forums/showt...time-intervals

    http://www.mrexcel.com/forum/excel-q...intervals.html

  6. #6
    Registered User
    Join Date
    11-10-2015
    Location
    SINGAPORE
    MS-Off Ver
    2007
    Posts
    16

    Re: Calculating average wait time across time intervals

    oh you are the best! You nailed my request in such a quick time!

    i understood ur formula except for the part towards the end '("<"&F2+1/48)'. This is your second criteria am I right? the first criteria states that time of arrival must be after 8am. How about the second criteria above? I don't quite understand the '48' and all. How does this relate to adding up the waiting time in each half-hourly interval? i am confused. thanks!

    oh one more thing i forgot! if on top of each bar in the bar chart i would like to indicate the NUMBER of patients who arrived in that half-hourly interval, is there a fast way to do it! sorry to trouble you again *badlyspelledbuoy*!
    Last edited by rjng90; 04-16-2016 at 02:19 AM.

  7. #7
    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
    53,048

    Re: Calculating average wait time across time intervals

    Thanks for sharing those links

    Did you let them know too, that you had posted on other forums?

  8. #8
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,915

    Re: Calculating average wait time across time intervals

    I can get the patient numbers at the bottom of each bar. Is that any good to you?
    It's done by creating another series and plotting it on a secondary axis (because the scales are so different it would affect the original chart), then hiding axis values and the bars but leaving the data labels visible.

    As for the 1/48 in the formula, this just means half hour. Excel deals with times as decimals. So 1 = a whole day. 1/24 would be 1 hour and 1/48 = half an hour.

    BSB

    EDIT: I'm guessing you solved the meaning of the 1/48 bit yourself as you've edited it out of your previous post.
    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. Calculating the overlapping time intervals
    By Mukund03 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-26-2015, 07:20 PM
  2. Calculating an Average Wait Time
    By clemattlee1 in forum Excel General
    Replies: 3
    Last Post: 07-11-2014, 09:41 AM
  3. Converting Data in Irregular Time Intervals into Regular Time Intervals
    By AlexJT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2011, 02:42 AM
  4. Calculating Time Intervals
    By ExceltoLead in forum Excel General
    Replies: 1
    Last Post: 03-19-2011, 09:14 AM
  5. Average wait time
    By evelynl in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-08-2009, 02:32 PM
  6. Excel find out the average wait time
    By botle in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-13-2009, 10:03 PM
  7. Calculating Time Intervals
    By JustMe602 in forum Excel General
    Replies: 4
    Last Post: 05-23-2007, 07:55 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