使用if语句for excel

发布于 2025-02-13 23:39:20 字数 168 浏览 0 评论 0原文

我有一个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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

温柔女人霸气范 2025-02-20 23:39:20

一个选项:

“在此处输入图像描述”

d1中的公式:

=CONCAT(XLOOKUP(MID(A1,SEQUENCE(2,,1,LEN(A1)-1),1)&LEFT(B1),{"ab","de"},{"c","d"},""))

One option:

enter image description here

Formula in D1:

=CONCAT(XLOOKUP(MID(A1,SEQUENCE(2,,1,LEN(A1)-1),1)&LEFT(B1),{"ab","de"},{"c","d"},""))
作死小能手 2025-02-20 23:39:20

因此,您可以使用此操作:

”在此处输入图像描述”

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:

enter image description here

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文