SOLVED

How to trim and concatenate data in different cells?

Copper Contributor

I need to fill cell C with data from D, E, F and G cells with > separating them like Furniture > Cabinets & Storage. I'm looking for the formula to do it. Could you please help me with it?

 

excel-microsoft.PNG

7 Replies

@pramodraam 

That's like

=D1 & " > " & E1 & " > " F1 & " > " G1
@sergei, I tried your formula but it isn't working.

@pramodraam 

Sorry for misprint

=D1 & " > " & E1 & " > " & F1 & " > " & G1

Please check in attached file as well

Thanks a lot. It is working, but it shouldn't result in last 2 > > "Furniture > Cabinets & Storage > >" If there is no data in the cell, it shouldn't add >. Can you please change your formula to address this?

best response confirmed by pramodraam (Copper Contributor)
Solution

@pramodraam 

That will be easier with

=TEXTJOIN(" > ", 1, D1:G1)

 as

image.png

@Sergei Baklan Great, this formula did it. Thank you.

1 best response

Accepted Solutions
best response confirmed by pramodraam (Copper Contributor)
Solution

@pramodraam 

That will be easier with

=TEXTJOIN(" > ", 1, D1:G1)

 as

image.png

View solution in original post