寻找最佳的excel公式来实现以下目标
0,1,2< 2天...... 3,4,5< 5天..... 6,7< 5天7天.... 8,9,10< 10天.....全部休息> 10天
示例表
Coulmn 1有年龄,第2列应该显示一个字符串
< 2 days or < 5 days or < 7 days or < 10 days or > 10 days
如果年龄= 0,1,2第2列应该提到&lt; 2天 ...... 3,4,5&lt; 5天..... 6,7&lt; 5天7天.... 8,9,10&lt; 10天.....全部休息&gt; 10天
答案 0 :(得分:1)
试试这个
=IF(col1<=2,"<2days",IF(col1<=5,"<5days",IF(col1<=7,"<7days",IF(col1<=10,"<10days",">10days"))))
其中col1是包含您正在检查的值的列。相应地修改条件
答案 1 :(得分:0)
以下是一些可用于扩展的公式。
C1中的公式是,
=LOOKUP($A1, {0,3,6,8,11}, {"<2 days","<5 days","<7 days","<10 days","10+ days"})
D1中的公式是,
=CHOOSE(1+($A1>2)+($A1>5)+($A1>7)+($A1>10), "<2 days","<5 days","<7 days","<10 days","10+ days")
......或,
=CHOOSE(MATCH(A1, {0,3,6,8,11}), "<2 days","<5 days","<7 days","<10 days","10+ days")
根据需要填写。