简体   繁体   English

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?

I don't know who else to ask, so if you can help, I'd really appreciate it. 我不知道还有谁要问,所以如果您能提供帮助,我将不胜感激。

I have 4 columns: 我有4栏:

In column A, I have an updated list of 1000 product Sku's ie. 在A栏中,我有1000个产品Sku的更新列表,即。 A1001 from column C. In column B, its empty. C列中的A1001。在B列中,其为空。 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. 在C列中,我有1500 sku的旧列表。在D列中,我有一个对应于C列中sku的名称值。 Pita bread 皮塔饼

Sample Data: 样本数据:

A       B      C       D

A10897  ()  A10897  PITA

A15006  ()  A15006  CANDLE

A15008  ()  A15016  TOMATO

A15009  ()  A15017  MILK

A10900  ()  A10900  BREAD

A10901  ()  A10901  WHEAT

So far, I've tried 3 formulas, but its not returning the correct name. 到目前为止,我已经尝试了3个公式,但公式未返回正确的名称。

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

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. excel公式将比较A列中的单元格与C列是否匹配,如果匹配,则在A列中与之匹配的单元格旁边,将C列旁边的D列中的单元格显示为B列中的单元格。

Like This: 像这样:

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...

Please help despair 请帮助绝望

Thank you. 谢谢。

这应该工作:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如果列A单元格与列B单元格匹配,则显示与列B相同的行的C列值 - if Column A cell matches Column B cell, display column C value of same row as column B 如果excel文件2中的B列与excel文件1中的B列匹配,则将excel文件1中的A列值输出到excel文件2中的C列中 - If column B in excel file 2 matches Column B in excel file 1, output column A value in excel file 1 value to column C in excel file 2 将单元格与 A 列进行比较,如果在 B 列中匹配,则写 X - Compare a cell with column A and write X if Matches in Column B 比较两个Excel列A&B,并在一个单元格中添加A中不存在的条目的第三列C的数据 - Compare two Excel columns A&B and add in one cell the data of a third column C of the entries not present in A 根据 A 列中的值锁定或解锁 B 列和 C 中的单元格 - Locking or unlocking cells in columns B and C depending on value in column A Excel 2016-在b列中找到匹配的行,然后在Next Sheet Column A中求和C列副本的总和 - Excel 2016 - Find matching rows in column b, then sum Column C copy sum in Next Sheet Column A Excel公式将A列和B列的值转移到C和D空单元格 - Excel Formula to shift value of Column A and B to C and D empty cells EXCEL:如果 column_A 中的单元格包含来自 column_C 的单词,则将其旁边的单词(来自 column_D)插入到 B - EXCEL: if a cell in column_A contains word from column_C, then insert the word next to it (from column_D) INTO B 如何比较A / B列,以及如何从A列返回不匹配B的值 - How to compare columns A/B, and return value from column A that does not match B Excel vba:基于列A中的单元格获取列B中的单元格范围 - Excel vba: Getting range of cells on column B based on cell in column A
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM