Forum Discussion
Zdenek_Moravec
Jan 21, 2024Brass Contributor
How to wrap table, not vector (WRAPCOLS for tables)
Dear colleagues I have a long table of 5 columns and maybe 200 rows. The task is to wrap the table after a specified number of rows to see the table in landscape on a new sheet. I was thinking abo...
Zdenek_Moravec
Jan 24, 2024Brass Contributor
Dear colleagues,
Thank You very much for Your responses. For me personally, the power query solution is the most understandable way. The LET function is very powerful and looks clear, but it is for me an Excel university. I am going to debug all the LET variations, on the first look, I have no clue, how the sub functions work.
Zdenek Moravec
Thank You very much for Your responses. For me personally, the power query solution is the most understandable way. The LET function is very powerful and looks clear, but it is for me an Excel university. I am going to debug all the LET variations, on the first look, I have no clue, how the sub functions work.
Zdenek Moravec
- mtarlerJan 25, 2024Silver Contributor
Zdenek_Moravec alternatively this formula doesn't use any Lambda but in no way am I saying it is better or more efficient, it was just a self-challenge for a different approach:
=LET(in, A1#, wrapAt, 21, TEXTSPLIT(TEXTJOIN(",",FALSE,HSTACK(WRAPCOLS(TEXTSPLIT(TEXTJOIN(",",FALSE,EXPAND(in,,COLUMNS(in)+1,";")),,",;,"),wrapAt,""),EXPAND(";",wrapAt,,";"))),",",";",TRUE,,""))
- LorenzoJan 25, 2024Silver Contributor
Whatever option you finally adopt, please don't forget to mark it as response/solution as I'm quite sure such a need will surface again. Thanks