Search code examples
excelexcel-formulaexcel-match

Excel - Match cell values in 2 separate columns and paste a different value if match


=INDEX(C:C,MATCH(A1,B:B,0))

The above formula is being pasted in D1.

I need it to return the C cell that on the same row as the matching A and B fields:

A       B        C            D

77      22       MO91117
88      88       MO91337
99      99       MO12347
22      77       MO91837

Ideally, if I ran the formula in D1, it would return M091837.

Any help would be greatly appreciated!


Solution

  • Answering for completeness. Credit to A.S.H for the answer (in the comments of the question).

    Ensure that both columns that you are trying to match are formatted similarly. It looks like the error in this question was that one column was formatted as text, and one column was formatted as a number. As an example the number 4 and the character 4 are represented differently in software, thus not returning expected values when trying to match text and numbers.