问题
I have 3 columns in my Excel list. Column A contains "computer names", column C contains "Computer names" and column D contains "IP addresses". I want to compare data in column A with column C and if a match is found, copy the corresponding value in column D (IP Address) into column B.
Hope it makes sense.
回答1:
Use VLOOKUP
Example in cell B1
:
=VLOOKUP(A1,C1:D4,2, FALSE)
where C1:D4
is the table that contains computer names and their corresponding IP addresses.
来源:https://stackoverflow.com/questions/22927231/how-to-compare-two-columns-in-excel-and-copy-the-corresponding-value-in-the-next