问题
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