Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google sheets 如何在单个单元格中计算数值范围?_Google Sheets_Google Sheets Formula_Gs Vlookup - Fatal编程技术网

Google sheets 如何在单个单元格中计算数值范围?

Google sheets 如何在单个单元格中计算数值范围?,google-sheets,google-sheets-formula,gs-vlookup,Google Sheets,Google Sheets Formula,Gs Vlookup,对于一个电子表格的想法,我想根据一天内消耗的卡路里量制作一个基于点的系统,要做到这一点,我想制作一个范围样式的系统 我知道在OOP语言中,你会接受一个变量,然后执行IF-ELSE(或switch)语句,但我不太确定如何在电子表格中执行 =IF(D11<900,"-200"),=IF(D11<1200,"200"), =IF(D11<1500,"0") =IF(D11嵌套IF =IF(D11<900,-200,IF(D11<1200,200,IF(D11<15

对于一个电子表格的想法,我想根据一天内消耗的卡路里量制作一个基于点的系统,要做到这一点,我想制作一个范围样式的系统 我知道在OOP语言中,你会接受一个变量,然后执行IF-ELSE(或switch)语句,但我不太确定如何在电子表格中执行

=IF(D11<900,"-200"),=IF(D11<1200,"200"), =IF(D11<1500,"0")
=IF(D11嵌套IF

=IF(D11<900,-200,IF(D11<1200,200,IF(D11<1500,0,"Greater than 1500")))
=如果(D11尝试:


请看:

哦,谢谢!这很有道理,我觉得这很简单
=VLOOKUP(D11, {0, -200; 900, 200; 1200, 0; 1500, "GREATER THAN 1500"}, 2, 1)