1.

Solve : Excel: Calculating days between clinic visits per patient?

Answer»

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,Have you TRIED:
Code: [Select]=A2-A1
=A3-A2
etc.
Quote from: oldun on May 31, 2013, 07:24:25 PM

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.
In which case:
Code: [Select]=IF(B2=B1,A2-A1,0)


Discussion

No Comment Found