Excel LAMBDA Loop Through Each Column to CONCAT

ExcelToDAX

Board Regular
Joined
Feb 9, 2023
Messages
167
Office Version
  1. 365
Platform
  1. Windows
How can I loop through each column in a spilled range and CONCAT the values?

Ideally I want row 8 to be a spilled range instead of dragging the CONCAT function across the columns.

1700601257977.png
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
What about: =BYCOL(A1#,LAMBDA(r,TEXTJOIN("",,r)))

If Sheet2!A12:D15 may contain blanks, you could change A1 to: =IF(Sheet2!A12:D15="","",Sheet2!A12:D15)
 
Upvote 1
A minor thing but CONCAT (that you originally mentioned) is specifically designed to do what TEXTJOIN with "" delimiter does so I would suggest sticking with that.
(It is less to type as well ;))

Excel Formula:
=BYCOL(A1#,LAMBDA(r,CONCAT(r)))


If Sheet2!A12:D15 may contain blanks, you could change A1 to: =IF(Sheet2!A12:D15="","",Sheet2!A12:D15)
If there could be blanks in that range, then assuming either ..
  • the non-blanks are text as in the example or
  • the only use of this spilled array is this concatenation process (ie numbers do not need to remain numbers)
.. this could also be used
Excel Formula:
=Sheet2!A12:D15&""
 
Upvote 1
Solution

Forum statistics

Threads
1,216,068
Messages
6,128,596
Members
449,460
Latest member
jgharbawi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top