使用if语句for excel
我有一个3个数据列,作为文本,我想根据其条件输出一些文本,使用if语句 ex)
如果第1列的右端字母为“ A”,并且第2列的左字母为“ B”,则输出应为“ C”,如果第1列的左端字母为“ D”,则第2列的左字母为“ e”输出应该是
我尝试使用的“ f”,但是以某种方式无法运行代码,我需要帮助!
I have a 3 data columns written as text and I want to output some text based on their condition using if statement
Ex)
If right end letter of column 1 is “a” and left letter of column 2 is “b” the output should be “c” and if left end letter of column 1 is “d” and left letter of column 2 is “e” the output should be “f”
I have tried if statement with AND but somehow the code does not run and I need help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一个选项:
d1
中的公式:One option:
Formula in
D1
:因此,您可以使用此操作:
cy C2中的公式:
if(and(右(a2,1)= f2,左(b2,1)= g2),vlookup(right(a2,1),$ f $ 2:$ h $ 6,3,0),“”)
,否并返回真实的vlookup找到并返回了这封信。
So you can work with this:
Formula in cell C2:
IF(AND(RIGHT(A2,1)=F2,LEFT(B2,1)=G2),VLOOKUP(RIGHT(A2,1),$F$2:$H$6,3,0),"")
So if the and returns true the vlookup finds and returns the letter.