Amran
Amran

Reputation: 657

Excel - Match Value and Get Value of Other Column

I am trying to match 2 values on a table and if match, display the value from other column. Example is as below,

A         B          C          D       E                     F
ABC      1          WWE         5       output (1 FROM ABC)   output (10 FROM ABC)
GHI      2          XYY         1
XXY      3          ABC         10

May I know how to do it? Can it be done in Excel

Upvotes: 1

Views: 509

Answers (1)

Jordan
Jordan

Reputation: 4514

Use an INDEX/MATCH formula, for example in column E:

=INDEX(B:B,MATCH($A1,A:A,0))

And in column F:

=INDEX(D:D,MATCH($A1,C:C,0))

I'd usually wrap these in an IFERROR(,"") function to tidy up any errors. These formulas are based on you searching for the value in column A each time, if you want to search for a string instead simply replace $A1 with "ABC".

Upvotes: 3

Related Questions