Hi-
I am currently trying to organize data for our research lab and would really appreciate some help. We currently have a program that generates an Excel spreadsheet of test data that we need to reorganize a bit.
Each mouse the program monitors has a unique number, and its movement is measured through a series of trials. Unfortunately, the program creates a new row for every trial period instead of keeping each mouse's data on the same row. So instead of something useful like Animal1 - Movement Time 1- Movement Time 2.. etc in one row, the program generates a separate row for every Time Period and we end up with 7 rows of data for each mouse.
What I would like to do is create a macro that sorts the information by Animal Number (got that part down!), checks to see if the following row is a duplicate animal number, and if it is, selects data in columns I through N, pastes the selected data on the end of the first row containing that Animal Number, and then deletes that entire row. Basically:
- If Animal Number = Duplicate
- Copy I to N of row below first original Animal Number
- Delete entire row containing duplicate Animal Numbers
- Repeat with remaining animal numbers until Animal Number cell is blank
I have attached an example of this worksheet, the first two rows show where I manually deleted the duplicate information and pasted it onto the end of the matching Animal Number.
We do research to alleviate Parkinson's seizures, so it's for a good cause and I would really appreciate the help!TFC Ethos 080612.xlsx
Bookmarks