+ Reply to Thread
Results 1 to 11 of 11

Working out the number of people on treatment on a day (and then for every day)

  1. #1
    Registered User
    Join Date
    03-30-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    5

    Post Working out the number of people on treatment on a day (and then for every day)

    I have a list of people with a start and stop date for a particular treatment. These dates are in different columns

    [PatientID] [Start_date] [Stop_date]

    The dates go back to the 1980's up until today. I want to create a table from this with the number of people on this treatment on a particular day, and then for every day over this time period.

    I think that i should be using the SUMPRODUCT FORMULA but cant get this right. I have searched for equivalent threads and cant seem to find that this has been asked although i would have thought that this has been asked before. Can anyone point me in the right direction please?

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Working out the number of people on treatment on a day (and then for every day)

    How about providing us with a sample workbook so we don't have to make-up data?

    Attach a sample workbook. 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.
    HTH
    Regards, Jeff

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: Working out the number of people on treatment on a day (and then for every day)

    Maybe try as attachment.

    Untitled.png


    ALL ARRAY FORMULA:

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Attached Files Attached Files
    Last edited by bebo021999; 03-30-2018 at 09:27 PM.
    Quang PT

  4. #4
    Registered User
    Join Date
    03-30-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    5

    Smile Re: Working out the number of people on treatment on a day (and then for every day)

    Thank you very much for your response. I think that you must have superpowers! I am afraid that i may not have explained myself very well ... cant get your attachment to work (sorry i am new to this)

    2018-03-31.png

    As you did in your spreadsheet there are start and stop dates, although one extra element is that if there is no stop date then the patient is on the treatment still and has not stopped. Then I wanted to know how many were on all the days up until the current day .... is that possible?

  5. #5
    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: Working out the number of people on treatment on a day (and then for every day)

    Hi,

    The paperclip 'Attach' icon doesn;t work - no don't ask!

    To attach a file choose the Go Advanced button and look underneath the post area for the 'Manage Attachments' option and take it from there.
    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.

  6. #6
    Registered User
    Join Date
    03-30-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    5

    Re: Working out the number of people on treatment on a day (and then for every day)

    Sorry, here is the type of data in the attachment ...
    Thanks to all for being so helpful
    Attached Files Attached Files

  7. #7
    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: Working out the number of people on treatment on a day (and then for every day)

    Is it really the case that you only want to see the number being treated for just days from 20/10/1981 to 14/11/1981 and for months from Oct 81 to Nov 83?

    Or in fact are you looking for information for any of your days and months through to the last date in your data of 5/10/2017?

  8. #8
    Registered User
    Join Date
    03-30-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    5

    Re: Working out the number of people on treatment on a day (and then for every day)

    Richard
    Sorry yes it is until the current day, that was just an example
    Simon

  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: Working out the number of people on treatment on a day (and then for every day)

    Does the absence of a date in the date removed column mean that you count a 'patient treatment' incidence on every day from the start date to the current date, or are you only interested in records which have both a start and removed date?

  10. #10
    Registered User
    Join Date
    03-30-2018
    Location
    London, England
    MS-Off Ver
    365
    Posts
    5

    Re: Working out the number of people on treatment on a day (and then for every day)

    No, where there is a blank they are still on the treatment and therefore need to be counted. Hope that makes sense

  11. #11
    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: Working out the number of people on treatment on a day (and then for every day)

    Does the attached help.

    I first had to convert all your dates to proper Excel date numbers since they were all text values and although you can use the DATEVALUE function to convert within a larger formula I prefer to deal with original date numbers. To convert them all just enter a zero in a cell, copy it then choose the whole of columns B & C and use Paste Special Add - which adds zero to all the 'dates' and forces them to become date numbers.

    For a particular day enter the date in G2, the table of months in G4:H4 down counts the number of start dates within the month which don;t have a removed date.
    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. How do I calculate the number of people working
    By richpngu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-19-2016, 03:28 AM
  2. Counting The Number Of Extra People Working Each Hour
    By stagnut in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-19-2014, 07:52 AM
  3. 2 people working on the same spreadsheet?
    By burnsie in forum Excel General
    Replies: 2
    Last Post: 01-14-2013, 11:36 AM
  4. Yearly Treatment Calendar based on treatment dates
    By ajay_psingh25 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-02-2011, 09:33 PM
  5. [SOLVED] how do i count how many people are working between two times in e
    By APYDS in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  6. how do i count how many people are working between two times in e
    By APYDS in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. [SOLVED] how do i count how many people are working between two times in e
    By APYDS in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

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