在新单元格中组合两个单元格,用短划线和小写替换所有空格

时间:2016-07-15 21:17:38

标签: google-sheets excel-formula google-docs

尝试在Google电子表格中合并两个单元格,将所有空格替换为" - ",并将所有内容替换为小写。

小区1:GWG-1

单元格2:产品名称1

New Cell 3:gwg-1-product-name-1

2 个答案:

答案 0 :(得分:3)

您的基本公式是:

""

我们可以将两个单元连接在一起以获得所需的输出:

public class FirebaseMessagingService extends com.google.firebase.messaging.FirebaseMessagingService{

    String TAG = "FirebaseMessagingService";
    @Override
    public void onMessageReceived(RemoteMessage remoteMessage){

        Log.i(TAG," input string :"+ String.valueOf(remoteMessage.getData()));
        /**
         * Parse remote input and pass id, action, frequency and payload to eventHandler.
         * **/

        String messageType = remoteMessage.getMessageType();// messageType is null always
        if(messageType.equalsIgnoreCase("Data")){
            Log.i(TAG, " Data notification received");
        }
        else if(messageType.equalsIgnoreCase("Notification")){
            Log.i(TAG, " Push notification received");
        }
}

enter image description here

Google表格

enter image description here

答案 1 :(得分:2)

这个公式是动态的,因为它实际上并不重要你决定包含多少个单元格:

=SUBSTITUTE(LOWER(JOIN("-",A1:A2))," ","-")

enter image description here