I Hope you are well.
I have this excel sheet and I want to split it on two excel Sheets or Two DataTables.
First Should Contain Everything Up to The Yellow Lines without including them, meaning a certain row will be emtpy.
Second File will Read below the yellow lines until the next yellow lines where the rows are still emtpy.
Please guys advice.
Should I use a for each row, and copy the row to another data table if the particular column value is not empty?
Yes, I think you are right. See example below. You could use a counter to name the datatables/excelfiles dynamically, because you probably won’t know in advance how many you will need…
IF column B is empty
THEN add row to Datatable2
IF datatable2.rows.count >0
THEN Write Range, Clear Datatable2
Hi @Hurmet_Noka ,
You can achieve this with macro also.
1 - Get Row Number of highlighted row and store it in variable
2 - Now use Read range one for range “A1:D” + (lastHighlitedRow -2)
3 - For Second table use range as “A” + (lastHighlitedRow + 2) + “D” + lastUsedRow
I have shown you to get row number for column A, similar way you can also get last row number of entire sheet.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.