Hello,
I have attached a spreadsheet that contains the code on Module named PROGRESSReadingExcelFile(Sub ReadExcel). Basically, it copies the data on Worksheet: "Sheet1", when column B has the name TOT in it and then copy its contents right after TOT, after 6 lines. For example, when it finds TOTXPTO, it copies data from C10 to H11 into Worksheet TOTXPTO.
It is copying correctly but when the loop ends I get an error because I am doing a loop in worksheets and when it goes to last loop the worksheet Index is set to a number that does not exist. If you open the code, it should be easier to understand. There might be a way do deal with loop in Worksheets that avoid that condition?
Thanks!
Bookmarks