Forum Discussion
chrishall166
Oct 21, 2025Brass Contributor
A button to transpose data into a destination table
Hi, I have a table filled with data that I need to be pasted into a final blank table but the destination table is larger than the original table. Also the data needs to be sorted by one column and t...
- Oct 21, 2025
In general that could be formula if locations of Source and Destination are predefined
=LET( source, TRIMRANGE($A$4:$C$10000), IDs, SORT( TRIMRANGE($E$4:$E$10000) ), headers, CHOOSECOLS($A$3:$C$3, {1,3,2} ), VSTACK( headers, HSTACK( IDs, XLOOKUP(IDs, CHOOSECOLS(source,1), CHOOSECOLS(source,3), ""), XLOOKUP(IDs, CHOOSECOLS(source,1), CHOOSECOLS(source,2), "") ) ) )
SergeiBaklan
Oct 21, 2025Diamond Contributor
In general that could be formula if locations of Source and Destination are predefined
=LET(
source, TRIMRANGE($A$4:$C$10000),
IDs, SORT( TRIMRANGE($E$4:$E$10000) ),
headers, CHOOSECOLS($A$3:$C$3, {1,3,2} ),
VSTACK(
headers,
HSTACK(
IDs,
XLOOKUP(IDs, CHOOSECOLS(source,1), CHOOSECOLS(source,3), ""),
XLOOKUP(IDs, CHOOSECOLS(source,1), CHOOSECOLS(source,2), "")
)
)
)
chrishall166
Oct 21, 2025Brass Contributor
Thank you SergeiBaklan, I'm just going to give this a try!
- chrishall166Oct 22, 2025Brass Contributor
SergeiBaklan, I've found your method to be the most friendly for my expected users level of experience so I've implemented that.