试试这个,在你需要判断的单元格里面输入以下公式
=LOOKUP(A1,{253,268,279},{100,200,300})
你可以将{}替换为单元格,like this
=LOOKUP(A1,$C$1:$C$3,$D$1:$D$3)
C1-C3分别为253,268,279,对应的D1-D3为100,200,300
假设数据在A1,则在B1输入
=if(and(a1>=253,a1<268),100,if(and(a1>=268,a1<279),200,if(a1>=279,300,"")))
或者
=VLOOKUP(A1,{0,"";253,100;268,200;279,300},2,TRUE)
=if(a1<253,“错误”,if(a1<268,“100”,if(a1<279,“200”,“300”)))
=LOOKUP(A1,{253,268,279},{100,200,300})
或者
=IF(A1>=279,300,IF(A1>=268,200,IF(A1>=253,100,"")))
=IF(AND(A1>253,A1<268),100,IF(AND(A1>268,A1<279),200,IF(A1>279,300,"")))