I'm not sure whether this can easily be done in Excel but ... I have a file:
ID Disease Gene1 Gene2 Gene3 Gene4 Gene5
1 T2DM ABCD ABCDE ABFJ ASKL ASLL
2 T2DM ASKFA BSDAW KWAS JKS
3 LDL GJS ZYRLA
I wish to keep the first two columns and transform the columns Gene1
through Gene5
into rows, like this:
ID Disease Gene
1 T2DM ABCD
1 T2DM ABCDE
1 T2DM ABFJ
1 T2DM ASKL
1 T2DM ASLL
2 T2DM ASKFA
2 T2DM BSDAW
2 T2DM KWAS
2 T2DM JKS
3 LDL GJS
3 LDL ZYRLA
As I have 1000+ IDs, is there an easy way to do this?