Hi Michael
yes, I wrote the code that way because but there needs to be a trigger for the macro to stop. One way you could do that is to stop when there is nothing in column E (assuming this is never blank), not column C. To do that, change
to
alternatively, I could tweak the code so the macro runs until the last used row in the worksheet, but that could cause you problems if you have anything in rows below your main table.
you might also want to consider what you want to do when a cell in column C is blank. with the adjustment above, the macro will copy the content of every cell in Column C that is different to the cell above it, so a blank cell in Excel will result in a blank line in your Word document, a sub heading and text below that, then a new Heading 1 style header below that (assuming the next cell in column C contains text).
Bookmarks