用空单元格连接列大家好,
我有一个包含不同列的数据集,其中包含一些空的随机单元格(如下表中的示例)。 我想连接不同列的值,并仅当单元格的内容与空值不同时才使用“_”分隔单元格的内容(如下面的“concat”列)。 有没有人对如何以智能方式进行此操作有任何建议?
谢谢你的帮助!
| 名称 | 年龄 | 性别 | 康卡特 |
疯子 | 31 | | Mads_31 |
| | | 中号 | 中号 |
| 约翰 | 25 | | 约翰_25 |
| 朱莉娅 | 19 | F | Julia_19_F |
数据表脚本编写回复:用空单元格连接列您应该能够在新列 Concat 中使用一个简单的函数:

回复:用空单元格连接列这是编写公式的一种方法
colList = {"Column 1", "Column 2", "Column 3"};
x = "";
For( i = 1, i <= N Items( colList ), i++,
If( As Column( colList[i] ) != "",
If( x != "", x = x || "_" );
x = x || Char( As Column( colList[i] ) );
)
);
Trim( x );回复:用空单元格连接列你好,这里还有一个公式。
</CODE></P>
<PRE><CODE class=" language-jsl">Concat Items( Words( :Name || "," || :Age || "," || <SPAN class="lia-emoticons-autosuggestions"><SPAN class="lia-emoticons-search-term">:Sex</SPAN></SPAN>, "," ), "_" )
干杯,
布雷迪