Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Excel: Calculating days between clinic visits per patient  (Read 4094 times)

0 Members and 1 Guest are viewing this topic.

eyedoc2020

    Topic Starter


    Newbie

    • Experience: Familiar
    • OS: Windows 7
    Excel: Calculating days between clinic visits per patient
    « on: May 31, 2013, 09:03:55 AM »
    Hello,

    I have a database with two columns, column A is date of clinic visit, and column B is patient name.  I would like to be able to calculate the average days between clinic visits per patient.  Im having lots of trouble figuring this out, I would greatly appreciate if anybody could help.

    Sample database:

           A                         B
    16-Mar-10         Smith, John
    10-Oct-12          Smith, John
    22-Dec-12         Smith, John
    5-Feb-09            Smithers, Jane
    24-Nov-12         Smithers, Jane
    5-June-11          Springer, Mary
    12-May-13          Stein, Jason

    It would like to figure out a way for column C to display days between exams for each patient (ie Smith, John would be 939 days between visit 1 and 2, and 73 days between visit 2 and 3).

    Thanks to all,

    oldun

    • Guest
    Re: Excel: Calculating days between clinic visits per patient
    « Reply #1 on: May 31, 2013, 07:24:25 PM »
    Have you tried:
    Code: [Select]
    =A2-A1
    =A3-A2
    etc.

    soybean



      Genius
    • The first soybean ever to learn the computer.
    • Thanked: 469
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows 10
    Re: Excel: Calculating days between clinic visits per patient
    « Reply #2 on: June 01, 2013, 07:21:37 AM »
    Have you tried:
    Code: [Select]
    =A2-A1
    =A3-A2
    etc.
    This would work if a column only had one patient in it.  But, that's not the case here, so it won't work.  In other words, with reference to the sample data in the original post, calculating the difference between lines 3 and 4 would be a number days between two appointment dates but for two different patients.  Clearly, that's not the desired result. 

    So, the solution will be something more complicated than what you've suggested, oldun.  I can't take time now to try to come up with a solution; not sure I could anyway.  But, I think this may be a case where an Access database would be more suitable for this type of data analysis.

    oldun

    • Guest
    Re: Excel: Calculating days between clinic visits per patient
    « Reply #3 on: June 02, 2013, 04:46:54 AM »
    In which case:
    Code: [Select]
    =IF(B2=B1,A2-A1,0)