LOOKUP(MID(A2,3,2),{"01","02","03"},{"1班","2班","3
发布网友
发布时间:2024-10-22 06:49
我来回答
共1个回答
热心网友
时间:2024-11-10 02:09
LOOKUP(MID(A2,3,2),{"01","02","03"},{"1班","2班","3班"})
意思为如果A2单元格从第三个字符起取两个字符与数组中{"01","02","03"}中第某项相同,则返回另一个数组{"1班","2班","3班"}中的第某项内容
假设A2单元格的内容为 220345 则 MID(A2,3,2) 返回 "03"
而"03"是{"01","02","03"}中的第三项,所以公式返回{"1班","2班","3班"}中的第三项即"3班"
这个公式可以简写成
LOOKUP(--MID(A2,3,2),{1,2,3},{"1班","2班","3班"})
或
=--MID(A2,3,2)&"班"