问题
I am new to this website; if I make any mistakes, please accept my apologies.
I am in need of some help regarding a search and replace method in Excel.
My goal is to select a range of random values from a column (e.g. column D) and see if there is a corresponding match for that value in the unique column (e.g. column A). If this value is in column A, I would like to insert that value in the same row as the corresponding value column A but into another column (e.g. column E).
I have tired various different functions such as IF
, VLOOKUP
, and MATCH
but have had no luck so far.
Can someone please show me how can this be done or if its even possible to do?
Thank you!
回答1:
In cell E1, put this formula:
=IFERROR(VLOOKUP(A1, D:D, 1, 0), "")
This looks for A1 in column D and if there is a match, put that matched value in the cell E1.
EDIT: I put the IFERROR()
so that blanks are returned when there is no match.
来源:https://stackoverflow.com/questions/18365821/vlookup-match-insert-in-excel