I have tried Googling and multiple different searches in StackOverflow, but I haven’t found a solution to this problem. I have a website (that requires SSO and login – so no direct queries allowed), that provides period data sets in tabular form. Whenever I copy from the site and paste into Excel (and I’ve tried every way possible), it always comes out as a single column of data:
My Data |
---|
Header A |
Header B |
Header C |
Data A1 |
Data B1 |
Data C1 |
Data A2 |
Data B2 |
Data C2 |
How do I create a query that can automate a transposing of all of this data into the correct/original tabular format?
Header A | Header B | Header C |
---|---|---|
Data A1 | Data B1 | Data C1 |
Data A2 | Data B2 | Data C2 |
Data A3 | Data B3 | Data C3 |
I have tried solving this on several phases of this process:
Copy (the way I copy it)
Paste (every way that I can find in Excel to control the pasting of this)
Standard Excel tools
PowerQuery (but I’m limited in my PQ skills)
2
Answers
If you need to rearrange data in place, use the next macro:
You need to select the top left cell and copy it to right to have as much columns as necessary:
Then run the macro and get the result:
Use WRAPROWS:
You can change the
3
to the number of columns desired.