Look at column and match and add this text te [Solved/Closed]

- - Latest reply:  Ajith - May 23, 2013 at 07:04 AM
Hello,
I am working with Excel 2003. I need the formula to look in Column 1 and look at all these names. and compares the name if it is Sally the add Tom in column next to it ( this is who she reports to) , if first column second row is Mary and automatically add Julie on the same row she is but this specific column.

Example:
Name of employee Reports to
Sally Tom
Mary Julie
Bob Julie
John Tom
so it looks at NameofEmployee column and it matches if it is this , this , this name then the manger is this and adds that name in the specif column.

Thank you
Brian b
See more 

1 reply

Best answer
Posts
191
Registration date
Sunday April 12, 2009
Status
Member
Last seen
February 16, 2010
209
3
Thank you
Suppose in your sheet1 you have data of Employee Name & Manager of employee in column A & B

A B
emp Manager
Sally Tom
Mary Julie
Bob Julie
John Tom

Now in your sheet 2 you have only names in Column A
A
emp name
Sally
Mary
Bob
John

Now in cell B2 of sheet2 write this formula and drag it down ...

=INDEX(Sheet1!B:B,(MATCH(Sheet2!A2,Sheet1!A:A,0)))





Say "Thank you" 3

A few words of thanks would be greatly appreciated. Add comment

CCM 5744 users have said thank you to us this month

> Braian B -
I followed the exact same steps, and excel does the trick, but it freezes almost seconds after it completes the job so i cant save my work, or use it in any way. Any ideas?? thanks in advance.
mubashir aziz
Posts
191
Registration date
Sunday April 12, 2009
Status
Member
Last seen
February 16, 2010
209 > james -
Hi James,


Try to use ranges instead of A:A mean

=INDEX(Sheet1!$B$1:$B$100,(MATCH(Sheet2!A2,Sheet1!$A$1:$A$100,0)))






> mubashir aziz
Posts
191
Registration date
Sunday April 12, 2009
Status
Member
Last seen
February 16, 2010
-
Hi
I need help in comparing 2 columns in different sheet and if the values are same then corresponding value from another column in sheet 2 needs to be inserted in sheet1 different column .
eg :
Sheet 1
A B
12
13
45
34

sheet 2
A B
11 j
78 k
13 l
34 m
67 n
here on comparing 2 sheets , sheet 1 B should give values l & m of sheet 2 corresponding to 13 & 34 ...I tried IF stmt but was not successful .. Cn anyone help me out ??
His is best answer.
it really worked good...thanks a lot..