首页 > 解决方案 > 需要在excel中写下公式

问题描述

if answer=='No' and score>high_threshold:
    final_score=3
elif answer=='No' and (score<high_threshold or score>low_threshold): 
    final_score=2
elif (answer=='No' and score<low_threshold) or (answer=='Yes' and score>high_threshold): 
    final_score=1
elif (answer=='Yes' and score<low_threshold)"
    final_score=0
else:
    final_score=0

我是 Excel 的新手,刚到这一步

=IF(AND(F2="No",L2>=high_threshold),"3",IF(L2<high_threshold,L2>low_threshold,"2"))

标签: excel

解决方案


从一一构建公式开始。Excel 有相当不错的工具提示系统。看一看(WENN()意思IF()ODER()意思OR()):

在此处输入图像描述

在此处输入图像描述

最后尝试使用 Ribbon > Formulas > Evaluate 评估公式:

在此处输入图像描述


推荐阅读