I'll be studying the code you both gave me (thanks for that BTW) as it is clearly more advanced than mine. I will have to start to understand how to write more efficient code as I can notice a slowdown when executing my macro.
Nevertheless, for the time being, I decided to puzzle something together myself (there used to be times I could'nt do any of this so I'm kind of pleased with it).
I've changed the comments to English and I'll try to go into more detail about what it does.
- Alright, first the variables LastRow and Originalsheet. The first variable is the last row of the source sheet which contains data. If that row contains data all the others above it will too. Originalsheet is the name of the source sheet. The first row that can contain data (for the source sheet that is) is row 6 and is hard coded (see the for loop).
- The target sheet contains titles here and there so that the first row which is allowed to receive data is row 11. I've called the variable Doelrij (target row). 1 is added to Doelrij if something was written to the target sheet. Makes sense because otherwise I'd have empty rows in between.
- I only need to copy data if there is something in either column E or F. If both are empty nothing needs to be copied.
The rest will probably be childsplay for you guy's to understand
I know the code probably sucks but I'm going to try to write it in different ways using your examples. Time to study