I have a spreadsheet that looks similar to this (only many more rows on the actual). Notice how on line 20, there is a line break and the same data is repeated after the break.
The rows of data may de different each time. I have about 10 different templates similar to above, this is just an example of 1 of them.
I would have a DataTable with the item numbers and it already will know which template to use because I’m obtaining the DataTable from filtering another DataTable. I just cannot figure out how to get it to paste each item number down, but stop at the line break, and then paste the next item number down, and so on.
If you are new to excel macros, it will be difficult to explain how to do this. Try learning macros. Below will be the steps you have to follow.
Let us call the sheet with the table as TableSheet and the one with data DataSheet.
Run a loop on each row in the DataSheet
For each value go the the TableSheet and paste the value until you encounter a blank in column A.
DataSheet - contains a sample of what my data may look like in Excel before converting to a DataTable.
TableSheet- contains a sample of what my Excel sheet will look like where I want to paste my data.
So for each “Item” in my DataSheet, I want to paste it to the “Item” column on my TableSheet all the way down until the line-break in TableSheet. I then want to take the next item from DataSheet and do the same, ensuring to start after the line break, so it doesn’t overwrite what was just written, and so on.