Reference every 4th row from a master list of modifiable length

R

RiotLoadTime

I'm creating an excel database for a clinical study on patients wit
migraine. Each patients will treat 4 attacks (episodes). Thi
presents a bit of a problem, since there's some information I'
collecting that's specific to the patient (demographic information lik
sex, height, etc.), and some that is specific to each attack (like th
pain level of that attack, the duration of that attack, etc.). T
account for this, I decided to give each patient four rows--one fo
each attack--and I put their deomographic information in the secon
row, leaving the other three blank in those fields (see below).

However, this lead to complications when I was programming th
statistics, so I ended up making a new worksheet for each attac
(worksheets "Attack 1", "Attack 2", "Attack 3", and "Attack 4", i
addition to the original "All Data" worksheet). These worksheets hav
all the attack-specific information for each patient. For example, th
attack 1 worksheet would be the first row of each patient (i.e. ever
4th row, starting with row 2) from column 5 on (i.e. skipping th
demographic stuff).

I don't know how many patients there will be, so I'd like for the use
to be able to add new patients (rows) to the All Data worksheet an
have it automatically update the other worksheets. Is there a way t
do this other than manually going to every single row in each Attac
worksheet and typing "=" and the referenced cell number? Also, if
have to manually do this, I'll just have to pick a random number o
patients to do it for (i.e. some large number that I don't they'll g
over) instead of catering to the specific number of patients in th
"All Data" worksheet.

(Note: In the example worksheet below, a cell with just "----
indicates a blank cell. The "--" are just place holders for me to tr
to line things up)

| Sex | Height | Age | Weight | Attack | Pain | Duration | Etc . . .
 
B

Bernie Deitrick

To make your life simpler, you should have only two worksheets: "Demographics" and "Data"

In the Demographics sheet, you should have a table like this, that has all your demographics:

PatientID | Sex | Height | Age | Weight | Etc . . . .
Patient1 |M----|---176--|-19--|---178--| -------------
Patient2 |F----|---157--|-29--|---118--| -------------
Patient3 |M----|---198--|-39--|---198--| -------------

In the Data sheet, you should have a database style Table like this:

PatientID | Attack | Info|Value .
Patient1 |----1----|Pain|----S----
Patient1 |----1----|Duration|----19----
Patient1 |----1----|Etc...|---------------
Patient1 |----2----|Pain|----M----
Patient1 |----2----|Duration|----35----
Patient1 |----2----|Etc...|---------------
Patient1 |----3----|Pain|----Mo----
Patient1 |----3----|Duration|----29----
Patient1 |----3----|Etc...|---------------
Patient1 |----4----|Pain|----S----
Patient1 |----4----|Duration|----18----
Patient1 |----4----|Etc...|---------------
Patient2 |----1----|Pain|----S----
Patient2 |----1----|Duration|----19----
Patient2 |----1----|Etc...|---------------
Patient2 |----2----|Pain|----M----
Patient2 |----2----|Duration|----35----
Patient2 |----2----|Etc...|---------------
Patient2 |----3----|Pain|----Mo----
Patient2 |----3----|Duration|----29----
Patient2 |----3----|Etc...|---------------
Patient2 |----4----|Pain|----S----
Patient2 |----4----|Duration|----18----
Patient2 |----4----|Etc...|---------------

If you want all the demographic information in the data table, then use VLOOKUP formulas (keyed to
the PatientID, and using FALSE as the fourth parameter) to gather the data from the demographics
table.

When you want to see the information for Attack 1, simply apply Data / AutoFilter to your data
table, or use a pivot table to summarize the data.

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top