View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
stewpot stewpot is offline
external usenet poster
 
Posts: 6
Default Comparing multiple rows of data

Joel
I forgot to say that the data already comes ordered by patient and date,
when I run the query from Oracle

"Joel" wrote:

Th esolution to this problem depends on where you place the results and how
you want to review the results. Some people may recommend for you not to use
a macro and use sumproduct, but I think this is not the best solution.

My recommend datations is to copy the data to another worksheet and to sort
by patient names and dates. Then remove any patients who where in the
hospital only once and to keep only the last two visits to the hospital for
each patient. I can help write the macro if this is what you want.

It would help if you can post a sample of the patient data. sort the
patient by name and dates so we can see the columns top compare. then change
the patient names and other vital info. You only need to post a few examples
of the data along with the columns and worksheet name where the data is
located.

"stewpot" wrote:

I have hundreds of rows of patient data and within that data I need to look
at each individual patients data.
For every patient I have several rows of data, each row contains the same
fields but they relate to different events in their hospital stay which are
numbered 1,2,3,etc. I am trying to compare the latest event with the previous
event (e.g. event 3 with event 2) and show whether their test results (which
is a number) increase or decrease and if for instance it increases and is now
over 30, count it as a yes and if it goes down count it as a no. The macro
will need to identify the most recent event and then compare this to the
previous event, this will be different for each patient record. Can you help?