获得条件结果

Get a conditional result

添加细节。 我有一个这样的电子表格:

B           C       D       E       F   G           H   
Date        Time    Kwh $/KwCost        Hours/MonthsCost/Kwh
2021-01-01  0:15    0.69    [=10=].00   0   months      [=10=].15
2021-01-01  0:30    0.51    [=10=].00   0   11-12,1-5   [=10=].05
01/08/21    0:45    0.3     [=10=].00   0   hours   
2021-01-01  1:00    0.76    [=10=].00   0   06-08,15-20 ```

规则:如果月份#在g3中,小时#在g5中,则$h$2。

我正在使用

=iF (LSTOR(MONTH(c2),$h)= MONTH(c2)) and (LSTOR(HOUR(d2),$h)=HOUR(d2)) then $i else $i

但我得到了

509 Missing operator Operator is missing, for example, "=2(3+4) * ", where the operator between "2" and "(" is missing.)

谁能告诉我错误在哪里?

考虑到此版本 ListOK 插件中的所有函数都使用正整数(零除外),您必须指定 G5 移位范围内的值,7-9,16-21 而不是 06-08,15-20。在这种情况下,公式

=IF(OR(LSTOR(MONTH(B2);$G)="";LSTOR(HOUR(C2)+1;$G)="");$J;$J)

应该会给你想要的结果。