+ Reply to Thread
Results 1 to 4 of 4

Calculating days between days by individual person

  1. #1
    Registered User
    Join Date
    07-24-2012
    Location
    Baltimore
    MS-Off Ver
    Excel for Mac 2011
    Posts
    45

    Calculating days between days by individual person

    Hi. One last question for the day!

    Spreadsheet attached. I need to calculate the number of days from a hospital discharge to the next admission. These are in two different columns. One person an have 1 or many admissions. If they don't have a readmission, I just want an NA returned. The values in the attached example spreadsheet were calculated by hand as an example of what I'm need.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Calculating days between days by individual person

    Are you sure your calculations are correct?

    In D2
    =IF(COUNTIF(A3:$A$21,A2),INDEX(B3:$B$21,MATCH(A2,A3:$A$21,0))-C2,"NA")

    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    07-24-2012
    Location
    Baltimore
    MS-Off Ver
    Excel for Mac 2011
    Posts
    45

    Re: Calculating days between days by individual person

    Fantastic. Worked like a charm. Thanks!

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Calculating days between days by individual person

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Chart Individual Days
    By Boo123 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-15-2013, 02:55 PM
  2. Split total hours in a week to individual days
    By abyblr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-15-2013, 09:17 AM
  3. Replies: 8
    Last Post: 04-30-2012, 11:26 AM
  4. Turn Start/End Dates into individual days
    By ker9 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-17-2011, 01:17 PM
  5. Calculating time elapsed in days and count days within same range
    By michellem410 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-19-2008, 01:13 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