Home » excel » excel – Compare two columns and return value from third column

excel – Compare two columns and return value from third column

Posted by: admin April 23, 2020 Leave a comment

Questions:

Column 1 is my source data column, Column 2 and 3 are my reference list. What I want is to index or match the rules from Column 2 + Column 3 and compare with Column 1 and return the matched rule value to the result column within same row.

enter image description here

Please note that all the values are string (text) and no numbers involved.

How to&Answers:

I may be misunderstanding your question, but along the lines of what user1917229 suggested, can you simply check if your source column is empty, and if not, return the first value in the first column and the column 3 value in the second (per your update)? For example, in cell D2 (and dragged down):

=IF(A2="", "", A2)

And E2:

=IF(A2="", "", VLOOKUP(A2,$B$2:$C$14,2,FALSE))

Note that I’m not sure what you wanted with the +, so this just literally returns it – if this isn’t what you want, hopefully the concept makes sense and can be adjusted.

enter image description here

Answer:

VLookUp may be what you want.

 =VLOOKUP(A3,$B$3:$C$12,2,TRUE)