如何在包含字符串的单元格中以百分比形式显示公式结果?

时间:2020-10-19 20:05:35

标签: excel excel-formula

我有单元格条目:

if (password_verify($password, $userInfo["userPassword"])) {
    if ($userInfo["emailVerified"] == true) {
        setcookie("loginId", $userInfo["id"], 0, "/");
    } else {
        // Email was not verified.
        header('HTTP/1.1 522 Email Not Verified');
        header('Conent-Type: application/json; charset=UTF-8');
        die(json_encode($result));                                    
    }                    
} else {
    // Password verification failed.
    header('HTTP/1.1 523 Password verification Failed');
    header('Conent-Type: application/json; charset=UTF-8');
    die(json_encode($result));   
}

在一个单元格中,它返回输出:

="Males: "&COUNTIF(D2:D55,"Male")& " / "& ROUND(COUNTIF(D2:D55,"Male")/COUNTA(D2:D55),2)

这几乎是完美的,除了我希望输出读取:

Males: 22 / 0.41

但是,我怀疑单击百分比格式按钮不起作用,因为它是包含多个数据类型和文本字符串的单元格。我可以使用的所有Google指南都假定您可以按百分比格式按钮来更改数据显示类型。

我该怎么办?

0 个答案:

没有答案
相关问题