Reputation: 1143
I have a column with the name of different products, for example:
A
1 red car
2 blue whale
3 red carpet in the closet
4 star wars dvd extra especial thing
5 whatever with your however
I would like in column B:
B
1 +red +car
2 +blue +whale
3 +red +carpet +in +the +closet
4 +star +wars +dvd +extra +especial +thing
5 +whatever +with +your +however
I´m using Google Spreadsheets, but a solution to Excel would work just fine!
If the only way to accomplish that is using a custom formula, I would prefer a Google Spreadsheets formula. Although, I would really like to know a native formula if possible.
Upvotes: 4
Views: 23371
Reputation: 38373
To avoid have to fill-down and have to repeat this as new data is entered, on Google Sheets try
=ArrayFormula("+"®EXREPLACE(FILTER(E:E,LEN(E:E))," "," \+") )
Upvotes: 3
Reputation: 14764
Here you go. Put this in cell B1:
="+"&SUBSTITUTE(A1," "," +")
Now copy downward.
Upvotes: 7