Reputation: 19
As I am learning data analysis, the words concat and concatenate came up in some of my lessons. I understand how to use them, but I cannot tell what makes the two different.
Upvotes: 1
Views: 11900
Reputation: 1
in google sheets (as you tagged your question) there are:
CONCAT can join only two things while CONCATENATE can join two or more things.
however, the best you can do is to know they exist and never ever use them. they are totally obsolete and with arrays you will face more pain with both of them than expected.
if you want to join stuff in google sheets use
JOIN
but more superior is textjoin because it is able to skip blank cells
TEXTJOIN
tho, the best way to join stuff is to use good old &
especially when it comes to arrays. it's short, always works and it's short. example:
=ARRAYFORMULA(A2:A10&"-"&B2:B10)
wanna it shorter (?) drop the arrayformula and use index:
=INDEX(A2:A10&"-"&B2:B10)
wanna join A2 with C3 and D3:
=A2&C3&D3
wanna add delimiter:
=A2&"-"&C3&"-"&D3
or:
=JOIN("-"; A2; C3; D3)
or some other example:
=TEXTJOIN("-"; 1; A2:A5; G10)
also, it's worth noting that all of them (CONCAT, CONCATENATE, JOIN, TEXTJOIN) have a limit of 50000 characters.
to join larger datasets you will need to use QUERY like:
=QUERY(A1:A;;9^9)
Upvotes: 5