I have vba-code written for me but as I'm not ver knowledgeable about programming in vba ( I can follow the logic and understand what the code is doing) I cannot program it myself.
1. how can I make sure that whatever the size of imported data in the original sheet, is set as tabel1
The code splits up the raw data of a worksheet into different workbooks and/or worksheets depending on the content of certain cells.
A new workbook has to be made (or added to) whenever a cell in column A has WB: in it (in the attached file there are WB:AWP en WB:BM so there should be a workbook with the naam AWP and one with the name BM.
Each of these workbooks will contain worksheets that have the name of a location found in column F connectionlocation. The goal is to split the lines in the original worksheet (Sheet2) so that the content of each line is put in the right workbook and the right locationworksheet depending on the connectionlocation in column F.
The vba code does work this way but whenever it has to add to an already existing worksheet/book there is an error. As far as I have been able to debug the code, it cannot overwrite an exisiting worksheet. As the vba code is quite condensed I could not myself find the right way to insert a sub that would copy the information already in a sheet , add the line that caused the error into the right sheet and continue.
Any help would be greatly appreciated. If this explanation is not clear enough, I will gladly clarify.
regards
stephaan
Bookmarks