-2

I need to concatenate text from various cells to a single cell in a row. This can go to an infinite number of rows.

How to use the CONCATENATE function in Google Sheets for doing this?

I also need to know how to use "if else if" in Google Sheets. For example:

IF(A2="This")
JOIN(" ", A2,B2)
ELSE IF(A2="I")
JOIN(" ",A2,C2)
ELSE IF(A2="value")
JOIN(" ",A2,D2)

Is this possible in Google Sheets?

Concatenate Text From several cells into a single cell

Community
  • 1
  • 1
njnjnj
  • 978
  • 4
  • 23
  • 58
  • please check this link [link](https://www.thoughtco.com/concatenate-text-data-in-google-spreadsheets-3123801) – Maddy May 25 '17 at 05:27
  • @MaddyNikam I have edited my question according to my actual requirement. – njnjnj May 25 '17 at 06:46

3 Answers3

0

Simply use jon function:

=join(" ", a2:e2)

You may also like this arrayFormula solution:

Google sheet arrayformula join() and split() functions

Max Makhrov
  • 17,309
  • 5
  • 55
  • 81
0

to merge text:

=CONCATENATE(A1;" ";B1;" ";C1;" ";D1;" ";E1)

And yes you can use CONCATENATE in IF formula.

a_songaila
  • 21
  • 1
0

Try something like this

if(A2="This",JOIN(" ", A2,B2),IF(A2="I",JOIN(" ",A2,C2),IF(A2="value"),JOIN(" ",A2,D2),"Else Value")))

Syntax IF(logical_expression, value_if_true, value_if_false)

you can refer these links

https://productforums.google.com/forum/#!topic/docs/CmebALbskuo

https://support.google.com/docs/answer/3093364?hl=en

Maddy
  • 771
  • 5
  • 14