Okay so I've imported data and it's a bit daunting. Here's just a simplified example of the format the data is in:

Date Page Data Data Data
1 01012012 00 a b c
2 01012012 10 d e f
3 01012012 20 g h i
4 01012012 30 j k l
5 01012012 40 m n o

Basically all the data with the same date should be in the same row so I can put headers on them. There are over 600000 rows of data in my file so that's why I'm interested in a macro. In the example above, the cells in Column A are the date, B are pages in a report from that date, C-E are data points in the report. I would like to move everything to the top row and make it. To start I need a macro that can recognize where in the column there is a section to be moved because often pages are missing or added so it's not as easy as just moving 2nd row, then 3rd row, then 4th etc.



Date Page Data Data Data Date Page Data Data Data
1 01012012 00 a b c 01012012 10 d e f
2
3 01012012 20 g h i
4 01012012 30 j k l
5 01012012 40 m n o

My thoughts were to create a macro that looks for (in the example) pages of type 10 then moving the data associated with it to the row containing page 00, after page 00's data. Then creating a macro that looks for pages of type 20 a moving it, and so on, running a macro for each type of page.

So If cell contains 10, move all the fields in the same row to the end of the row containing the cell 00 and then delete that now-empty row.

It's probably extremely simply, but I just can't figure it out.

Someone let me know if that doesn't make sense.

Thank you, everyone