Hi all!
I'm working with some data that is pasted in to Cell A1 of Excel. The volume of data occupies Column A and B but can extend thousands of rows down, separated by single empty rows. The data is generally in the following format, where VARIABLE A is in Column A and VARIABLE B is in Column B. The length of the data can vary (e.g. A3:B20 or A3:B150). If I only have a single SECTION, then I'd like to move each SECTION to a new set of columns e.g. C:D for TIME XXX, E:F for TIME YYY, G:H for TIME ZZZ etc.
However(!), in a different data set, I can have multiple SECTIONS at the same time step, so if that's the case, I'd like to group all the time steps together e.g. for four SECTIONs A:H is TIME XXX, I:P is for TIME YYY, Q:X is for TIME ZZZ etc.
SECTION
TIME XXX h
VARIABLE A VARIABLE B
X Y
X Y
X Y
X Y
SECTION
TIME YYY h
VARIABLE A VARIABLE B
X Y
X Y
X Y
X Y
SECTION
TIME ZZZ h
VARIABLE A VARIABLE B
X Y
X Y
X Y
X Y
I have some basic go-bys for moving columns of a fixed size, but I'm struggling with the varying data lengths and some of the logic for grouping timesteps. Any guidance all would be massively appreciated!
Cheers
I'm working with some data that is pasted in to Cell A1 of Excel. The volume of data occupies Column A and B but can extend thousands of rows down, separated by single empty rows. The data is generally in the following format, where VARIABLE A is in Column A and VARIABLE B is in Column B. The length of the data can vary (e.g. A3:B20 or A3:B150). If I only have a single SECTION, then I'd like to move each SECTION to a new set of columns e.g. C:D for TIME XXX, E:F for TIME YYY, G:H for TIME ZZZ etc.
However(!), in a different data set, I can have multiple SECTIONS at the same time step, so if that's the case, I'd like to group all the time steps together e.g. for four SECTIONs A:H is TIME XXX, I:P is for TIME YYY, Q:X is for TIME ZZZ etc.
SECTION
TIME XXX h
VARIABLE A VARIABLE B
X Y
X Y
X Y
X Y
SECTION
TIME YYY h
VARIABLE A VARIABLE B
X Y
X Y
X Y
X Y
SECTION
TIME ZZZ h
VARIABLE A VARIABLE B
X Y
X Y
X Y
X Y
I have some basic go-bys for moving columns of a fixed size, but I'm struggling with the varying data lengths and some of the logic for grouping timesteps. Any guidance all would be massively appreciated!
Cheers