+ Reply to Thread
Results 1 to 4 of 4

Counting total number of days in specified period for dataset

  1. #1
    Registered User
    Join Date
    05-07-2013
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    12

    Counting total number of days in specified period for dataset

    I am trying to find a way of counting the total number of days medical devices were in-situ for a fairly large dataset.
    The worksheet has a few thousand rows. Column A – unique identifier for patient; column B – date inserted (Aug 02 – Aug 13); column C – date removed or audit date. There is no missing data, all rows have both dates. Some devices in for few days or weeks, some for up to 7 years.
    I want to count each 12 month period (starting 1 Aug 02) the total “device days” for that year.
    (e.g. if device inserted 1 Feb 03 and removed 1 Apr 03, in year period starting 1 Aug 02 would have been in for 59 days. Another device inserted on same day and not removed until 9 Sept 05, would for first period (01/08/02- 31/07/03) 181 days, second period 366 days, third 365 days and fourth (01/08/05-31/07/06) 39 days). Therefore for the two rows, the first period total would be 240 days (59+181).
    I’m sure there is a simple way of doing this, but I can’t find it. Thank you for your help. Nick

  2. #2
    Registered User
    Join Date
    09-23-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Counting total number of days in specified period for dataset

    Maybe I don't understand a hidden complexity of what you're doing, but have you tried subtracting the later dates from the earlier one and summing the results? =sum(date4-date3,date2-date1) Substituting cell locations for the "date"s.

  3. #3
    Registered User
    Join Date
    05-07-2013
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    12

    Re: Counting total number of days in specified period for dataset

    Quote Originally Posted by Born2RaiseHellebores View Post
    Maybe I don't understand a hidden complexity of what you're doing, but have you tried subtracting the later dates from the earlier one and summing the results? =sum(date4-date3,date2-date1) Substituting cell locations for the "date"s.
    Thank you for replying. I apologise for not being clear about the problem I'm trying to solve. The solution you have given will simply add all of the device days. I need to know for each year (2002, 2003 etc) how many devices were in during that year and for each one that was, how many days of that year they were in for.
    I've made a sample workbook, which I've uploaded to attachment, but can't immediately see how to attach it to this reply. As soon as I've figured it out I'll post it.
    Nick
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-07-2013
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    12

    Re: Counting total number of days in specified period for dataset

    The attachment appeared after all, fancy that. I hope it makes things a bit clearer. Once I can calculate the number of "device days" I can use this as the denominator for device infections in the same period. Hope that's clear. N

+ 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. Count number of days between a period
    By amurray2307 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-20-2013, 05:40 AM
  2. Counting days stayed during certain time period
    By analystEK in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-10-2013, 05:00 PM
  3. [SOLVED] Number of days within a period
    By nicholas.jacka in forum Excel General
    Replies: 1
    Last Post: 10-25-2012, 06:17 AM
  4. Replies: 0
    Last Post: 07-30-2012, 04:51 PM
  5. Counting Vacation or Sick Days within a Specified Time Period
    By Rhonda Hewett in forum Tips and Tutorials
    Replies: 1
    Last Post: 08-23-2005, 12:37 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