Forum

Notifications
Clear all

WRAPCOLS

9 Posts
4 Users
0 Reactions
69 Views
(@carthyeilygmail-com)
Posts: 14
Eminent Member
Topic starter
 

I can use WRAPCOLS for a single column, just want to know does it work for 2 Columns; I have 20 pages of 

Account No         Bonus 

123456               500.00

234567              1500.00

I have room on the excel sheet for 3 sets of these rather than 20 pages of one set.  I am currently copying to Excel & getting it done this way, just wondering if WRAPCOLS works for 2 or more cols?  

 
Posted : 17/12/2022 5:02 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Eileen,

I'm having trouble visualising the before and after view of your data that you want. Can you please upload a sample Excel file that shows the starting point and what your desired result would be?

Mynda

 
Posted : 17/12/2022 6:29 pm
(@carthyeilygmail-com)
Posts: 14
Eminent Member
Topic starter
 

Hi Mynda, See attached sample.  If I print this, is it on 10 pages, I am just checking if the WRAPCOLS will fit 3 lots of 2 Cols on a page, I am currently copying this to Word and fitting it to 2-3 pages, both attached.

 
Posted : 20/12/2022 5:29 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Eileen,

Nothing attached.  You need to click on the Start Upload button and then wait for it to upload completely.

Regards

Phil

 
Posted : 20/12/2022 5:55 am
(@carthyeilygmail-com)
Posts: 14
Eminent Member
Topic starter
 

Sorry see attached.

 
Posted : 21/12/2022 4:45 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Eileen,

The best solution I could come up with is to use TEXTJOIN in column C to concatenate the Account No. and Value together with a space:

=TEXTJOIN(" ",TRUE,A2:B2)

Or just use the ampersand like so:

=A2&" "&B2

Then copy down the column.

Then in cell E2 use WRAPROWS like so:

=WRAPROWS(C2:C507,5)

I don't think there's a way with formulas to interweave columns A and B across multiple columns, but someone cleverer than me might have some other ideas!

Mynda

 
Posted : 21/12/2022 6:25 am
(@debaser)
Posts: 837
Member Moderator
 

I feel like there should be something simpler using HSTACK and WRAPCOLS but it eludes me at the moment. Something like this should work - adjust the 50 to however many rows you can fit on a printed page:

 

=LET(numRows,50,data,A2:B507,MAKEARRAY(numRows,2*ROUNDUP(ROWS(data)/numRows,0),LAMBDA(r,c,IFERROR(INDEX(data,INT((c-1)/2)*numRows+r,1+ISEVEN(c)),""))))

 
Posted : 21/12/2022 6:34 am
(@debaser)
Posts: 837
Member Moderator
 

Not simpler, but just as an option:

 

=LET(data,A2:B507,numrows,50,numcols,ROUNDUP(ROWS(data)/numrows,0),CHOOSECOLS(HSTACK(WRAPCOLS(INDEX(data,,1),numrows,""),WRAPCOLS(INDEX(data,,2),numrows,"")),SCAN(numcols,SEQUENCE(numcols*2),LAMBDA(a,b,IF(ISEVEN(b),a+numcols,a-numcols + 1)))))

 
Posted : 21/12/2022 7:41 am
(@carthyeilygmail-com)
Posts: 14
Eminent Member
Topic starter
 

Thank you both Mynda & Velouria, I will see which one works better! Happy festivities!

 
Posted : 22/12/2022 4:38 am
Share: