Hey, I created a macro to try and transpose rows to columns and copy the transposed data to Word. The data in the excel sheet is of variable length, characters and numbers. What happens though is after a random point the data being copied to Word does not transpose properly. Also, due to the Autofit Cell size in Excel, the formatting gets all twisted in Word, I think.
I have attached the Sample data, the result that I get from my Macro, and the required data.
The column headings need to be on every page. and the data columns should be incremented on every page too such that each new page in Word has the column headings in Bold as seen, and the next data columns transposed in that format. I am not good in programming so I dunno what conditions do I have to use to keep headings constant only data columns incremented. Also, is it me going wrong resulting in latter pages not being transformed, or is it some issue with Excel/Word itself due to the cell size.
Can you point out the mistakes in my code? I certainly need to learn where I went wrong so I can fix it.
PortMacro.txt
Required.docx
Result.docx
Sample.xlsx
Bookmarks