ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Vlookup ? (https://www.excelbanter.com/excel-worksheet-functions/87654-vlookup.html)

chum

Vlookup ?
 

Hi Folks,

I try to do the following:
I have 2 tables with one common column A (name), however the records
are not in the same range. I want to compare both tables and to get as
a result in a 3rd table: column A(name), column C(birthday) and column
B (city).
I think I should use vlookup function, I made some attempts but was not
successful yet. Could someone help me ?
It would be great !
thanks,


1st sheet :
column A(name) column B (age) column C(birthday)
george 25 1 may
dan 36 5 may
brian 42 18 may
rick 18 8 may
rene 29 14 april
david 31 23 march
jack 25 28 april

2nd sheet :
column A(name) column B(city)
george washington
rick new-york
rene london
jack berlin
david stuttgart
brian paris
dan roma


--
chum
------------------------------------------------------------------------
chum's Profile: http://www.excelforum.com/member.php...o&userid=34262
View this thread: http://www.excelforum.com/showthread...hreadid=540226


SteveG

Vlookup ?
 

Using your sample data. In Sheet3! column A, input your names. For the
birthday in B2 input the following:

=VLOOKUP(A2,Sheet1!$A$1:$C$8,3,FALSE)

Format your cells with a date format.

For the city in C2 input,

=VLOOKUP(A2,Sheet2!$A$1:$B$8,2,FALSE)


Does that help?

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=540226


chum

Vlookup ?
 

Hi Steve,

thanks a lot, it works !

tell me if the 2nd list of names does not contain all records than the
1st list, do I need to beginn my formula with IF ?

thanks
Chum


--
chum
------------------------------------------------------------------------
chum's Profile: http://www.excelforum.com/member.php...o&userid=34262
View this thread: http://www.excelforum.com/showthread...hreadid=540226


SteveG

Vlookup ?
 

I assume you are getting an N/A error for those instances. To avoid
this change the formula to:

=IF(ISNA(VLOOKUP(A2,Sheet1!$A$1:$C$8,3,FALSE)),"No t In
List",VLOOKUP(A2,Sheet1!$A$1:$C$8,3,FALSE))

and

=IF(ISNA(VLOOKUP(A2,Sheet2!$A$1:$B$8,2,FALSE)),"No t In
List",VLOOKUP(A2,Sheet2!$A$1:$B$8,2,FALSE))

You can make it return whatever you want, I used Not In List as an
example.

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=540226


chum

Vlookup ?
 

thanks a lot !

thanks to you this was quickly solved
Chum


--
chum
------------------------------------------------------------------------
chum's Profile: http://www.excelforum.com/member.php...o&userid=34262
View this thread: http://www.excelforum.com/showthread...hreadid=540226



All times are GMT +1. The time now is 07:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com