+ Reply to Thread
Results 1 to 10 of 10

Advanced formula needed - Rostering statistics

  1. #1
    Registered User
    Join Date
    02-09-2019
    Location
    Australia
    MS-Off Ver
    Win 10
    Posts
    6

    Advanced formula needed - Rostering statistics

    So here is my problem.

    I have a roster with over 50 people.
    I have eight different start times over a 24 hour period (6am-2pm, 7am-3pm etc).
    I WANT to be able to create a formula to tell me how many people are working at any given hour on any given day.
    I have two columns i am working with. B column (dates) and G column (timings).
    Using Win10 and latest Excel.

    At the moment I am using a different roster program which does not support formulas. I can however transfer it to excel via .csv etc.
    When I transfer the file it shows me numerous columns but as values only. I do have a date column and timings column.

    So far I have attempted to create a COUNTIFS formula. That formula works great to tell me when people START at a given date and time but will not carry the value for an eight hour shift. = =COUNTIFS(B1:B2114,"02/02/19",G1:G2114,"*6a-2p*")
    That formula is placed on a 24hour timeline similar to the below example.

    This gave me a base stat to work from however; I must individually change each formula to suit each cell (dragging wont auto populate this one) which in reality, it is easier to manually count than to continue to change this formula individually for each cell.

    I basically want to end up with a time line stating how many people are working at a specific time;

    for example;

    Shift workers starts at midnight, 2am & 4am. First would finish at 8am for example.

    0000 0100 0200 0300 0400 0500 0600 0700 0800
    1 1 2 2 3 3 3 3 2

    Does anyone have a formula that would work? I am stumped on how to make this work, and make it feasible to use.

    Thanks.

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

    Re: Advanced formula needed - Rostering statistics

    Hi and welcome
    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    02-09-2019
    Location
    Australia
    MS-Off Ver
    Win 10
    Posts
    6

    Re: Advanced formula needed - Rostering statistics

    Hopefully this gives a better idea
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Advanced formula needed - Rostering statistics

    Make changes of G column as in H and I columns.
    Column B Dates are stored as text . Change it as dates.
    Select the range--> Data --> Text to columns --> Finish.

    Formula

    =COUNTIFS($B$4:$B$12,K4,$H$4:$H$12,"<"&L4,$I$4:$I$12,">"&L4)
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Advanced formula needed - Rostering statistics

    Hi

    You must convert your column 7 with this formula in a new column (H) to get the day time start work

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    From C21 to Z21 you must use real time 00:00 to 23:00

    In C23 use the following formula and drag forward and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Not needed but better, you can convert your column B to Excel real date.

    See the file
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-09-2019
    Location
    Australia
    MS-Off Ver
    Win 10
    Posts
    6

    Re: Advanced formula needed - Rostering statistics

    Thank you so much!!

    So i went ahead and tried this on a larger scale, then a glaring issue arose.

    There is no data between 2300 and 0600 the following day, it isn't looping.

    It is also pooling numbers (at times it is stating 54 etc when not possible)

    I have attached the new file, stats are at bottom.

    It feels good, looks good but not quite there.
    Attached Files Attached Files
    Last edited by Almont; 02-09-2019 at 11:29 AM.

  7. #7
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Advanced formula needed - Rostering statistics

    Try in C3342
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    02-09-2019
    Location
    Australia
    MS-Off Ver
    Win 10
    Posts
    6

    Re: Advanced formula needed - Rostering statistics

    That one is throwing out some huge numbers but I think it may be the sample i provided. I will try it against a proper roster.
    The initial H conversion formula is making 12 midday appear as midnight.
    Thank you for your ongoing support. It is coming along and is so close.

  9. #9
    Registered User
    Join Date
    02-09-2019
    Location
    Australia
    MS-Off Ver
    Win 10
    Posts
    6

    Re: Advanced formula needed - Rostering statistics

    Edited,

    See my bottom post for fix
    Last edited by Almont; 02-10-2019 at 04:27 AM.

  10. #10
    Registered User
    Join Date
    02-09-2019
    Location
    Australia
    MS-Off Ver
    Win 10
    Posts
    6

    Re: Advanced formula needed - Rostering statistics

    EDIT

    got it....

    I ended up running 3 columns,
    A = date,
    B= Shift times,
    C= =IFERROR(IFERROR(LEFT(B1,2)+IF(MID(B1,3,1)="p",12,0),LEFT(B1,1)+IF(MID(B1,2,1)="p",12,0))/24,"")+A1

    Then graphed next to it from E=

    =COUNTIFS($C$1:$C$882,"<="&$E3+F$1,$C$1:$C$882,">="&$E3+F$1-8/24)

    Thanks so much for all your help!

    Highly appreciated

+ 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. Sales Analysis, Advanced formula help needed please
    By shakkirk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-19-2018, 10:53 AM
  2. [SOLVED] Advanced 'If, Then' formula needed (I think)
    By kas05j in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-25-2014, 10:49 AM
  3. Display Word advanced properties (statistics) in an Excel worksheet
    By Peanuts890 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2013, 12:43 PM
  4. Replies: 2
    Last Post: 08-08-2013, 12:45 AM
  5. Advanced Formula Help Needed!!!
    By mgabes in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-05-2013, 09:35 AM
  6. Advanced Formula Help Needed!!!!
    By disco dave in forum Excel General
    Replies: 1
    Last Post: 09-01-2009, 05:30 AM
  7. Replies: 2
    Last Post: 07-21-2006, 10:05 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