I have a 2 worksheets called Original BOM and Item Order. The "Original BOM" worksheet is already populated by data. There are 7 columns with relevent data. For this question the other columns shouldn't matter.

Just to give everyone an idea of what I am doing, the Original BOm sheet contains several levels of part numbers. For instance a level 7 part number is consumed by a level 6 part number, a level 6 is consumed by a level 5 and so on until the level 1 part number is reached which is the final column. I'm trying to develop a production schedule and I want to start with my longest lead time level 2 item first, but in order to build that item I will have to start building level 7s, 6s, 5s, 4s, and 3s first. The data is sorted properly by longest lead time level 2 item, then by level 7, 6, 5, and so on.

I need a macro that will copy the level 7 items in order to the "Item" column in the "Item Order" worksheet as long as the level 2 item doesn't change. If it does change, then I need to start back at the top with my level 6 items, and repeat the process moving to 5s, 4s, and finally 3s. Once all of the items are properly copied and pasted to the other worksheet I need to move to my next level 2 item and repeat the process. I need to be able to skip null values.

Thanks for your help.