使用Excel或Google SpreadSheets公式为单元格中的每个单词添加加号

问题描述 投票:2回答:2

我有一个名为不同产品的列,例如:

   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

我想在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

我正在使用Google Spreadsheets,但Excel的解决方案可以正常工作!

如果实现这一目标的唯一方法是使用自定义公式,我更喜欢Google Spreadsheets公式。虽然,如果可能的话,我真的想知道原生配方。

excel google-sheets excel-formula spreadsheet
2个回答
6
投票

干得好。把它放在单元格B1中:

="+"&SUBSTITUTE(A1," "," +")

现在向下复制。


3
投票

为避免必须填写并在输入新数据时必须重复此操作,请在Google表格上尝试

=ArrayFormula("+"&REGEXREPLACE(FILTER(E:E,LEN(E:E))," "," \+") )
© www.soinside.com 2019 - 2024. All rights reserved.