Comparing two columns in excel sheet and if match writing adjucent cell value in new cell

纵饮孤独 提交于 2019-12-11 08:20:37

问题


i have 3 columns

A     B     C     D
11H   3HI   xyz
2AB   2CD   dfd
3HI   11H   123

I am struggling for the formula through which i can compare column A & B and if matched the adjucent cell value should be written in column D. For example

A     B     C     D
11H   3HI   xyz   123
2AB   2CD   dfd   ---
3HI   11H   123   xyz.

my column consisting of 43000 cells vertically. i have to compare all these values and write the results using excel. Please help me with this. Thanks in advance.


回答1:


The formula you're after is: =VLOOKUP(A1,$B$1:$C$3,2,FALSE)

Here's an image. Always show your attempts. We tend to help those who have attempted to help themselves more.

However, if the dashes are a must instead of the #N/A in D2, then this is the formula =IFERROR(VLOOKUP(A3,$B$1:$C$3,2,FALSE),"---")



来源:https://stackoverflow.com/questions/21024463/comparing-two-columns-in-excel-sheet-and-if-match-writing-adjucent-cell-value-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!