用If函数表达或是否有更简便的方法?
来源:学生作业帮 编辑:神马作文网作业帮 分类:数学作业 时间:2024/11/06 08:40:06
用If函数表达或是否有更简便的方法?
比如A1我作了个下拉菜单,有
SV/DSM(Manage Distributor)
SV/DSM(Not Manage Distributor)
SR(K City)
SR(Non-K City,Manage Distributor)
SR(Non-K City,Not Manage Distributor)
这5个选项,然后我要在B1中实现如果A1等于第一行的时候是20%,如果等于第二行的时候是10%,如果等于第三行的时候又等于某个百分比,这样用If的话怎么来实现,我做的公式不是都等于20%,就是都等于10%...另外如果不用If的话是否还有其他更加简便的方法?
比如A1我作了个下拉菜单,有
SV/DSM(Manage Distributor)
SV/DSM(Not Manage Distributor)
SR(K City)
SR(Non-K City,Manage Distributor)
SR(Non-K City,Not Manage Distributor)
这5个选项,然后我要在B1中实现如果A1等于第一行的时候是20%,如果等于第二行的时候是10%,如果等于第三行的时候又等于某个百分比,这样用If的话怎么来实现,我做的公式不是都等于20%,就是都等于10%...另外如果不用If的话是否还有其他更加简便的方法?
=(A1="SV/DSM(Manage Distributor)")*0.2+(A1="SV/DSM(Not Manage Distributor)")*0.1+(A1="SR(K City)")*0.35+(A1="SR(Non-K City, Manage Distributor)")*0.6+(A1="SR(Non-K City, Not Manage Distributor)")*0.5
或
=SUM((A1={"SV/DSM(Manage Distributor)","SV/DSM(Not Manage Distributor)","SR(K City)","SR(Non-K City, Manage Distributor)","SR(Non-K City, Not Manage Distributor)"})*{0.2,0.1,0.5,0.3,0.6})
再问: 非常感谢,第一条比较能容易理解,另外还想请教一下,如果我在A1和B1列中间再添加一列,(原来的B1列变为C1), B1是选择Yes或no的,那我要在C1中实现在A1的条件下满足B1为yes的情况下是20%,这样的话如何实现?
再答: �Ե�һ��Ϊ�����ÿһ���м���"*(B1="yes")"�Ϳ����ˡ����磬��һ���ĵ�һ� (A1="SV/DSM(Manage Distributor)")*0.2 ��Ϊ (A1="SV/DSM(Manage Distributor)")*0.2*(B1="yes") �ڶ����ͼ�Щ�ˣ�ֻ��һ��"*(B1="yes")"�Ϳ����ˣ����� =SUM((A1={"SV/DSM(Manage Distributor)","SV/DSM(Not Manage Distributor)","SR(K City)","SR(Non-K City, Manage Distributor)","SR(Non-K City, Not Manage Distributor)"})*(B1="yes")*{0.2,0.1,0.5,0.3,0.6})
或
=SUM((A1={"SV/DSM(Manage Distributor)","SV/DSM(Not Manage Distributor)","SR(K City)","SR(Non-K City, Manage Distributor)","SR(Non-K City, Not Manage Distributor)"})*{0.2,0.1,0.5,0.3,0.6})
再问: 非常感谢,第一条比较能容易理解,另外还想请教一下,如果我在A1和B1列中间再添加一列,(原来的B1列变为C1), B1是选择Yes或no的,那我要在C1中实现在A1的条件下满足B1为yes的情况下是20%,这样的话如何实现?
再答: �Ե�һ��Ϊ�����ÿһ���м���"*(B1="yes")"�Ϳ����ˡ����磬��һ���ĵ�һ� (A1="SV/DSM(Manage Distributor)")*0.2 ��Ϊ (A1="SV/DSM(Manage Distributor)")*0.2*(B1="yes") �ڶ����ͼ�Щ�ˣ�ֻ��һ��"*(B1="yes")"�Ϳ����ˣ����� =SUM((A1={"SV/DSM(Manage Distributor)","SV/DSM(Not Manage Distributor)","SR(K City)","SR(Non-K City, Manage Distributor)","SR(Non-K City, Not Manage Distributor)"})*(B1="yes")*{0.2,0.1,0.5,0.3,0.6})