In Excel, if A1 = C1, then B1 = D1; if A1 = C2, then B1 = D2; if A1 = C3, then B1 = D3?

In Excel, if A1 = C1, then B1 = D1; if A1 = C2, then B1 = D2; if A1 = C3, then B1 = D3?

Enter the formula in B1,
=VLOOKUP(A1,C:D,2,0)
Effect: when inputting the data in column C in A1, B1 will automatically display the value of column D in the same row