Formula to compare columns

  • Thread starter Thread starter EDF2017
  • Start date Start date
E

EDF2017

Hi,

Here is the challenge I'm having:

A B C D
1 6 500
3 5 200
5 4 100

I need to see if the value in cell A1 (etc.) appears in column C and if it
does then I want to return the value from column D in column B. So in this
case cell A3 matches C2 so I need the value in cell D2 to appear in cell B3.
Hopefully this makes sense and somebody will be able to help. Thanks in
advance!
 
Put this in cell B1 and then copy down (change your range accordingly)
=IF(ISNA(VLOOKUP(A1,$C$1:$D$3,2,FALSE)),"",VLOOKUP(A1,$C$1:$D$3,2,FALSE))
 
Assuming you have unique values in both A and C, I think the formula would
look like this:

=If(ISERROR(VLOOKUP(A1,C:D,2,FALSE)),"",VLOOKUP(A1,C:D,2,FALSE))

This would return the corresponding value from D where there is a match and
a blank if there is no match
 
Maybe one way:

=INDEX(A$1:D$3,MATCH(A3,C$1:C$3,0),4)

Adjust your ranges as needed.

Regards,
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top