+ Reply to Thread
Results 1 to 9 of 9

Daily Census by Shift

  1. #1
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    Question Daily Census by Shift

    Hello - Thank you for taking the time out to view my post.

    I want to calculate the avg daily census through admit and discharge dates. Furthermore, I would like to see this by shift.

    I am attaching my spreadsheet with all the admit dates/discharge dates and times.
    testcensus.xlsx

    I have three shifts: Day/PM/Night

    I am using the following formula for day admits
    =IF(AND(B3>=--"7:00",B3<=--"15:30"),"1","0")

    and following for day discharge
    =IF(AND(D3>=--"7:00",D3<=--"15:30"),"1","0")

    ---I am using CONCATENATE function to pull data from previous dates, but it is not giving me my daily census per shift.

    For example,
    if there were 5 admits on 12/2
    and
    4 admits on 12/1 that were also there on 12/2
    and out of those 4, 3 were discharged on 12/2

    I should get 6 as my census for that particular shift.

    I highlighted this in blue for discharge and red for people who stayed on for Day shift.

    testcensus.xlsx

    Thank you again for all your help.

    Newb

  2. #2
    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
    52,933

    Re: Daily Census by Shift

    for the dates, use this...
    =CONCATENATE(">= ",TEXT(AO4,"mm/dd/yyyy"))

    edit: reviewing what you are trying to do...

    you cannot do the sumif the way you are trying to do.
    =SUMIFS($H$2:$H$1048576,$A$2:$A$1048576,AT3,$C$2:$C$1048576,AU3)
    AT3 =CONCATENATE("<=",AO3) = <=40878

    so it is trying to find <=40878 (which is text btw) in a list of dates.

    try this instead...
    =SUMIFS($H$2:$H$5000,$A$2:$A$5000,"<="&AO3,$C$2:$C$5000,">="&AO3)
    Last edited by FDibbins; 12-15-2012 at 08:44 PM.
    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

  3. #3
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    Re: Daily Census by Shift

    Hi,

    I tried your formula and it still is giving me 7 for 12/2/2011.

    I think I am missing something here and this could be the discharge time for this period. Is there a formula that will give me a head count for people who were admitted minus discharged for a particular date formula,

    =SUMIFS($H$2:$H$5000,$A$2:$A$5000,"<="&AO3,$C$2:$C$5000,">="&AO3)

    doesn't take discharge time into consideration.

    My main objective is to get a census for that shift by date.

  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
    52,933

    Re: Daily Census by Shift

    you know what you are trying to achieve better than me, what value would you expect for 12/2?

    looking at your data,
    you had 6 admits on 12/1
    you had 4 discharge on 12/2
    you had 5 admits on 12/2

    so you have +6-4+5=7 which is what that formula gave you?

  5. #5
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    Re: Daily Census by Shift

    Thanks for replying to my post.

    if there were 5 admits on 12/2
    and
    4 admits on 12/1 that were also there on 12/2
    and out of those 4, 3 were discharged on 12/2

    I should get 6 for my census.

    The highlight in red indicates he amount of people still on
    and the blue represents
    the amount of people discharged.

    I hope that makes sense.

    Thank you again for replying to me.

    Newb

  6. #6
    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
    52,933

    Re: Daily Census by Shift

    i agree with what you said above, however that is not what your data shows...
    you has admissions on 12/1 and 12/2 of 11
    12/1/2011
    12/1/2011
    12/1/2011
    12/1/2011
    12/1/2011
    12/1/2011
    12/2/2011
    12/2/2011
    12/2/2011
    12/2/2011
    12/2/2011

    and you discharged 4
    12/2/2011
    12/3/2011
    12/2/2011
    12/2/2011
    that gives you 7 remaining
    if that does not match what you are looking at/working with, then maybe you uploaded the wrong file?

    you had 6 admits on 12/1
    you had 4 discharge on 12/2
    you had 5 admits on 12/2

  7. #7
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    Re: Daily Census by Shift

    Sorry it was actually 8 not 6 or 7.

    The data you copied is accurate. Thank you for the clarification.

    The only problem is that 12/3 should not be added to the discharge for 12/2.

    If we are looking at 12/2 for this particular person, it should not be subtracted by the admit #.
    Last edited by newbie4; 12-15-2012 at 10:02 PM.

  8. #8
    Forum Contributor
    Join Date
    08-08-2012
    Location
    USA, CA
    MS-Off Ver
    Excel 2007
    Posts
    131

    Re: Daily Census by Shift

    Total discharge should be 3 not 4 because 12/3 is not counted for 12/2 census. For some reason it is counting this, which is not accurate.

    Thanks for your help,

    Newb

  9. #9
    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
    52,933

    Re: Daily Census by Shift

    sorry, i didnt notice the 12/3 hiding in there...

    you had 6 admits on 12/1
    you had 3 discharge on 12/2
    you had 5 admits on 12/2
    so answer should be +6-3+5 = 8

    =COUNTIF($A$3:$A$928,"<="&AO4)-COUNTIF($C$3:$C$928,"<="&AO4) =8

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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