-2

If suppose I have data like

column1 column2 
504231  504109  
504109  504201  
504201      
504299

then I used the following formula =IF(ISNA(VLOOKUP($A2,$B$2:$B$5,1,0)),"",VLOOKUP($A2,$B$2:$B$5,1,0)) it works fine and it producess following result

column1 column2 column3
504231  504109  
504109  504201  504109
504201          504201
504299

Now I have data like

column1 column2 column3
504231   504109 smith
504109   504201 scott
504201      
504299

then I want ouput like

column1 column2 column3 column4 column5
504231  504109  smith       
504109  504201  scott   504109  smith
504201                  504201  scott
504299
        **OR**
column1 column2 column3
504231      
504109  504109  smith
504201  504201  scott
504299

1 Answer 1

-2

Use this for the names column (column5):

=IF(ISNA(VLOOKUP($A2,$B$2:$B$5,1,0)),"",VLOOKUP($A2,$B$2:$C$5,2,0))

This gives the following result, you wanted:

results

Explanation: You have to extend the lookup-matrix to column3 (C). And you need to pick the name from the second column of this matrix (2). Maybe have a look at this VLOOKUP-Tutorial.

1
  • Any idea why this was rated down? Did I make an error? Have you tried the solution @user3341177? Commented Mar 31, 2014 at 8:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .