Excel-如何比较2列中的单元格,如果B列匹配,则使用B列中匹配单元格旁边的C列中的值? [英] Excel - How to Compare Cells from 2 Columns then if Column B Matches, Use the Value in Column C next to the Matching Cell in Column B?

查看:143
本文介绍了Excel-如何比较2列中的单元格,如果B列匹配,则使用B列中匹配单元格旁边的C列中的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道还有谁要问,所以如果您能提供帮助,我将不胜感激.

I don't know who else to ask, so if you can help, I'd really appreciate it.

我有4列:

在A列中,我有1000个产品Sku的更新列表,即. C列中的A1001. 在B列中,其为空. 在C列中,我有1500 sku的旧列表 在D列中,我有一个对应于C列中sku的名称值.皮塔饼面包

In column A, I have an updated list of 1000 product Sku's ie. A1001 from column C. In column B, its empty. In column C, I have the old list of 1500 sku's In column D, I have a name value that corresponds to the sku in column C. ie. Pita bread

样本数据:


   A       B      C       D

A10897  ()  A10897  PITA

A15006  ()  A15006  CANDLE

A15008  ()  A15016  TOMATO

A15009  ()  A15017  MILK

A10900  ()  A10900  BREAD

A10901  ()  A10901  WHEAT

到目前为止,我已经尝试了3个公式,但是它没有返回正确的名称.

So far, I've tried 3 formulas, but its not returning the correct name.

=IF(ISNA(VLOOKUP(E2,$B$2:$B$9999,1,FALSE)),"No",F2)

什么excel公式将A列中的单元格与C列进行比较,以查看它们是否匹配,如果匹配,则将C列旁边的D列中的单元格的值显示到B列中与之匹配的单元格旁边的单元格中列A.

What excel formula will compare a cell in column A with column C to see if they match, and if they do, show the value of the cell in column D next to column C into cell in column B beside the matched cell in column A.

赞:


   A       B      C       D

A10897  PITA    A10897  PITA

A15017  MILK    A15006  CANDLE

A10901  WHEAT   A15016  TOMATO

... (NO MATCH)  A15017  MILK

... (NO MATCH)  A10900  BREAD

... (NO MATCH)  A10901  WHEAT

etc...

请帮助绝望

谢谢.

推荐答案

这应该有效:

  =IFERROR(VLOOKUP(A2,$C$2:$D$9999,2,0),"(NO MATCH)")

这篇关于Excel-如何比较2列中的单元格,如果B列匹配,则使用B列中匹配单元格旁边的C列中的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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