nic
nic

Reputation: 119

CONCATENATE rows with character for range in Excel

I have a pretty long list of numbers that I would like to concatenate for a regex like this:

2323
2352
3432
…

2323|2352|3432

Now, I can obviously use the CONCATENATE function, but it would still require me to enter each row individually like this:

=CONCATENATE(A1, "|", A2, …)

Is there any way to apply a range together with the splitting character?

Upvotes: 0

Views: 143

Answers (1)

JvdV
JvdV

Reputation: 75860

Typically this is a job for TEXTJOIN, available in Excel 2019 and O365.

=TEXTJOIN("|",,A1:A3)

Upvotes: 1

Related Questions