用空單元格連接列大家好,
我有一個包含不同列的數據集,其中包含一些空的隨機單元格(如下表中的示例)。 我想連接不同列的值,並僅當單元格的內容與空值不同時才使用“_”分隔單元格的內容(如下面的“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>, "," ), "_" )
乾杯,
布雷迪