Copy cell from another sheet where cell is value...?

Solved/Closed
wzshop Posts 2 Registration date Tuesday June 30, 2015 Status Member Last seen June 30, 2015 - Jun 30, 2015 at 03:47 AM
wzshop Posts 2 Registration date Tuesday June 30, 2015 Status Member Last seen June 30, 2015 - Jun 30, 2015 at 07:25 AM
Hi,
Is it possible to copy a cell from sheet 1 to sheet 2 where (for instance)
sheet 2 A1 is same value as a cell in sheet 1?

What I have is:
sheet 2, with a name column and an empty age column
sheet 1 with a name column and the age of the person.

I want a script that searches for the matching name and copies the corresponding name to sheet 2. Is that possible?

Thanks.

1 response

awakened00 Posts 1 Registration date Tuesday June 30, 2015 Status Member Last seen June 30, 2015 2
Jun 30, 2015 at 07:21 AM
Sheet1
A B
1 name age
2 michael =VLOOKUP(A2,Sheet2!$A$2:$B$6,2)
3 joseph =VLOOKUP(A3,Sheet2!$A$2:$B$6,2)
4 william =VLOOKUP(A4,Sheet2!$A$2:$B$6,2)
5 peter =VLOOKUP(A5,Sheet2!$A$2:$B$6,2)
6 john =VLOOKUP(A6,Sheet2!$A$2:$B$6,2)

Sheet2
A B
1 name age
2 john 33
3 joseph 34
4 michael 35
5 peter 36
6 william 37
2
wzshop Posts 2 Registration date Tuesday June 30, 2015 Status Member Last seen June 30, 2015
Jun 30, 2015 at 07:25 AM
Thanks for your comprehensive answer! This will work for me!
0