【问题标题】:Create a formula from text in other cells (Google Sheets)从其他单元格中的文本创建公式(Google 表格)
【发布时间】:2019-11-03 21:01:17
【问题描述】:

是否可以将E7和E8的文本合并成SUBSTITUTE FORMULA来返回C7的值?

电子表格链接: https://docs.google.com/spreadsheets/d/1JDOKIO2JncQRLdWR1vWfxcXR5z7IBOUJflNgbdMre7M/edit?usp=sharing

【问题讨论】:

    标签: google-apps-script google-sheets syntax concatenation google-sheets-formula


    【解决方案1】:

    E14 需要:

    =E7&CHAR(34)&C14&CHAR(34)&E8
    

    然后此脚本会将字符串转换为有效的公式,从 E14 转换为 E16:

    function onEdit() { 
    var sheet = SpreadsheetApp.getActive().getSheetByName('Página1');  
    var src = sheet.getRange("E14");
    var str = src.getValue(); 
    var cell = sheet.getRange("E16");
    cell.setFormula(str);              
    }
    

    【讨论】:

    • 谢谢!每天从您的提示中学到更多!
    猜你喜欢
    • 2021-02-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多