Forum Discussion
lents2000
Apr 03, 2024Copper Contributor
Turn one large column into many smaller columns
I have been struggling for days trying to turn my one column into a multiple columns. Essentially, I was trying to transpose my data to long form to insert into Stata but have been struggling. M...
OliverScheurich
Apr 03, 2024Gold Contributor
=DROP(REDUCE("",UNIQUE(A1:A30),LAMBDA(u,v,VSTACK(u,
HSTACK(EXPAND(v,5,,v),VSTACK(B1:B5),WRAPCOLS(FILTER(C1:C30,A1:A30=v),5))))),1)
Does this small sample represent what you want to do with a large database? The formula only works with Office 365 and Excel for the web. The assumption is that there are always the 5 cells "Series name", "2001", "2002", "2003" and "2004" for each of the 2 variables (GOP and ABC in this example) of a country.
PeterBartholomew1
Apr 04, 2024Silver Contributor
Clearly there is more to this problem than I read in to it! I got as far as
= WRAPCOLS(columnC, 14)