Utkarsh Gautam
Utkarsh Gautam

Reputation: 221

How merge value of one cell with a whole column?

I want to merge value of one cell eg: A1 with a three cells of different column eg: B1 to B3. That is if A1 equals "RED", B1 equals "TABLE", B2 equals "CHAIR" & B3 equals "FAN" then after merging the result would be -> RED TABLE, RED CHAIR, RED FAN.

Is there a default method to do this or I need to write a script for it.

Upvotes: 0

Views: 30

Answers (1)

JPV
JPV

Reputation: 27262

See if this works

=Arrayformula(A1&" "&B1:B3)

Or, if you want to use 'open-ended' ranges

=Arrayformula(if(len(B1:B), A1&" "&B1:B,))

If you want to have the output in one cell, wrap the JOIN function around it

=join(", ",Arrayformula(A1&" "&B1:B3))

Upvotes: 1

Related Questions