Hi,
I am working with a large spreadsheet with over 50000 rows containing data for 107 participants in a study observed 480 times. I originally had 476 observations, but now need to ad the four extra observations for each participant. There are some data that just need to be copied down from the previous information to fill the 4 new rows per participant (e.g., Vars 1-4 below). The other variables (e.g., Vars 20-22) change over time, so I will be entering them manually.
Data format is as follows:
Participant Time Var 1 Var 2 Var 3 Var 4 .....Var 20 Var 21 Var 22...
1 1 a1 b1 c1 d1 x11 y11 z11
1 2 a1 b1 c1 d1 x12 y12 z12
1 3 a1 b1 c1 d1 x13 y13 z13
1 4 a1 b1 c1 d1 x14 y14 z14
2 1 a2 b2 c2 d2 x21 y21 z21
2 2 a2 b2 c2 d2 x22 y22 z22
2 3 a2 b2 c2 d2 x23 y23 z23
2 4 a2 b2 c2 d2 x24 y24 z24
So, my task is as follows:
1. For each participant number listed in column 1, insert 4 blank rows at the end. Skip down 476 rows and insert 4 more blank rows, and so on.
2. Copy down variables that are common (Vars 1-4 in the example above) into the blank rows for each participant.
Could anyone help me with the script for this?
Thanks
SR
Bookmarks