Forum Discussion
priyankagarwal
Oct 05, 2021Copper Contributor
How to convert condition based rows into tables
hi,
I have an excel sheet with me in which user data is saved in rows but I have to convert it into coloumns. Explaining below what I mean.
This is table that I have.
| Customer Id | Month | Orders | GMV |
| 1 | 01/08/18 0:00 | 100 | 0.31 |
| 1 | 01/09/18 0:00 | 200 | 0.43 |
| 1 | 01/10/18 0:00 | 150 | 0.43 |
| 1 | 01/11/18 0:00 | 1201 | 0.42 |
| 2 | 01/08/18 0:00 | 12312 | 0.12 |
| 2 | 01/09/18 0:00 | 213134 | 0.68 |
| 2 | 01/10/18 0:00 | 3453 | 0.52 |
| 2 | 01/11/18 0:00 | 54 | 0.1 |
| 3 | 01/08/18 0:00 | 35 | 2.3 |
| 3 | 01/09/18 0:00 | 345 | 6.2 |
| 3 | 01/10/18 0:00 | 345 | 0.2 |
| 3 | 01/11/18 0:00 | 43532 | 10.4 |
As you can see in this table, every customer id (col#1) has a different GMV(col #3) for a fixed set of months (col #2) . I am trying to convert this table into columns. Something like this.
| Customer id | 01/08/18 0:00 | 01/09/18 0:00 | 01/10/18 0:00 | 01/11/18 0:00 |
| 1 | 0.31 | 0.43 | 0.43 | 0.42 |
| 2 | 0.12 | 0.68 | 0.52 | 0.1 |
| 3 | 2.3 | 6.2 | 0.2 | 10.4 |
Is there a way I can achieve this?
P.S. This is a small subset of the original data -- attaching an excel file too in case needed
2 Replies
- Shravan1905Copper Contributorselect range of the table and copy it and use paste special(control+alt+v)press and select transpose and click ok then rows will convert into colums ,this will work definetly,please try it
- Riny_van_EekelenPlatinum Contributor