Is there a way to get automatically transform the data from the 'list form' into the 'table form' other than doing it manually?
In the end I am wanting to use the 'table form' in excel
List form
Department: QUALITY CONTROL
Worker: DAVID
Case # 75967
Case # 75845
Case # 75949
Department: PORCELAIN
Worker: JONATHAN
Case # 75891
Case # 75947
Case # 75962
Department: SUB-STRUCTURE
Worker: BILL
Case # 75997
Case # 75864
Case # 75993
Table form
Any help would be greatly appreciated. I didn't even know what to Google to find out how to do this
EDITED - See below first piece of code I think this would work for you. The original list is supposed to be in "Sheet1", ordered data is written to "Sheet2". I'm using arrays (sData and sData2) for storing temporal data.
UPDATE according to comment In your comments you ask for a second list-to-table transformation. Basically you first need to differentiate between the "two things" in your list. This depends on your data. I choose to check is the first two (
Left
) characters in the cells is a number or not (IsNumeric
). Then the code is very similar to the one above here. When defining the variables on top addDim sFirstColumn as String
andDim iSecondColumn as Integer
(or whatever according to your data).