Excel IF多列 [英] Excel IF multiple columns

查看:48
本文介绍了Excel IF多列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一张大型excel问卷,我想简化数据输出以便进一步评估.

Im working with a large excel questionnaire that i would like to simplify the data output for further evaluation.

我想做的是一个IF语句,这样,如果X处于燃油中,P coloum将写为Fueloil.

What I'm trying to make is an IF statement, so that if the X is in fueloil the P coloum will write Fueloil ect..

=IF(K2="X";K1)

但是,当我尝试添加另一个IF语句时,excel返回VALUE.是执行此操作的正确方法,还是执行此操作的其他方法?

However when I'm trying to add another IF statement excel returns VALUE. is IF the right way to go about this or is there another way of doing this?

推荐答案

您根本不需要IF.您可以使用索引/匹配"组合公式,如下面的屏幕快照所示.向下复制单元格P2中的公式.

You don't need IF for this at all. You can use an Index/Match combo formula as demonstrated in the screenshot below. The formula in cell P2 is copied down.

=INDEX($K$1:$O$1,MATCH("x",K2:O2,0))

换句话说:在当前行中找到"x",然后从该列的第1行返回值.

In words: Find the "x" in the current row and return the value from row 1 of that column.

如果您的区域设置需要用分号分隔公式中的参数,请使用

If your regional settings require semicolons to separate parameters in formulas, please use

=INDEX($K$1:$O$1;MATCH("x";K2:O2;0))

这篇关于Excel IF多列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆