谁能帮我解释下下面的公式怎么解释,尤其是后面IF(LEFT(D3,3)="LZW","柳机",""))这个=IF(OR(MID(C3,8,1)="A",MID(C3,8,1)="B",MID(C3,8,1)="K",MID(C3,8,1)="M",MID(C3,8,1)="Q"),"B系列",IF(LEFT(D3,3)="LZW","柳机",""))
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/24 20:42:32
谁能帮我解释下下面的公式怎么解释,尤其是后面IF(LEFT(D3,3)="LZW","柳机",""))这个=IF(OR(MID(C3,8,1)="A",MID(C3,8,1)="B",MID(C3,8,1)="K",MID(C3,8,1)="M",MID(C3,8,1)="Q"),"B系列",IF(LEFT(D3,3)="LZW","柳机",""))
谁能帮我解释下下面的公式怎么解释,尤其是后面IF(LEFT(D3,3)="LZW","柳机",""))这个
=IF(OR(MID(C3,8,1)="A",MID(C3,8,1)="B",MID(C3,8,1)="K",MID(C3,8,1)="M",MID(C3,8,1)="Q"),"B系列",IF(LEFT(D3,3)="LZW","柳机",""))
谁能帮我解释下下面的公式怎么解释,尤其是后面IF(LEFT(D3,3)="LZW","柳机",""))这个=IF(OR(MID(C3,8,1)="A",MID(C3,8,1)="B",MID(C3,8,1)="K",MID(C3,8,1)="M",MID(C3,8,1)="Q"),"B系列",IF(LEFT(D3,3)="LZW","柳机",""))
这是一个两层IF函数的嵌套.
第一层IF:
判断是否满足条件OR(MID(C3,8,1)="A",MID(C3,8,1)="B",MID(C3,8,1)="K",MID(C3,8,1)="M",MID(C3,8,1)="Q"),也就是说MID(C3,8,1)是否等于"A"或者"B"、"M"、"Q"中的一个.
如果满足条件,就返回"B系列",否则执行第二层IF函数.
第二层IF:
IF(LEFT(D3,3)="LZW","柳机","")
如果不满足上述条件(MID(C3,8,1)=不等于"A"或者"B"、"M"、"Q"中的任何一个),就进一步判断LEFT(D3,3)是否等于"LZW",满足就得到"柳机",如果连这个也不满足就显示空.
这个公式可以简化:
=IF(OR(MID(C3,8,1)={"A","B","K","M","Q"}),"B系列",IF(LEFT(D3,3)="LZW","柳机",""))