ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   vLookup ... help please (https://www.excelbanter.com/excel-worksheet-functions/49008-vlookup-help-please.html)

sarahp

vLookup ... help please
 

Hi,

I made a mistake last time ....sorry

I have two separates excel workbooks ( not worksheets!!).

Workbook no 1 which has several columns : A ( XP numbers) to O

Workbook no 2 which has two columns : A ( XP numbers) and B ( DOI
numbers)


PS: both workbooks have column A in common ( XP numbers)

I am trying to extract the data from the column B ( DOI numbers ) of
workbook no 2 and insert them into workbook no 1 ONLY when the data
from column A ( XP numbers) match !


Can anyone help me with the formula?
Step by step ...

Also it is possible to automatically repeat the same formula accross
several other workbooks ?:

..... with Workbook no 3 and 4 and 5 ...etc ....( Identical to
woorkbook no 2) : has two columns : A ( XP numbers) and B ( DOI
numbers)

Many thanks

Sarah


--
sarahp
------------------------------------------------------------------------
sarahp's Profile: http://www.excelforum.com/member.php...o&userid=27623
View this thread: http://www.excelforum.com/showthread...hreadid=473739


swatsp0p


A formula similar to this should work for you:

=IF(ISNA(VLOOKUP(A2,'C:\My
Documents\[Book2.xls]Sheet1'!$A1:B1000,2,1)),"Not
Found",VLOOKUP(A2,'C:\My Documents\[Book2.xls]Sheet1'!$A1:B1000,2,1))

Of course, adjust the path to the other workbook and the lookup range
as needed.

I added the error trap of ISNA to return "Not Found" if the value in
col. A is not found in the lookup range. Without this, #N/A would be
returned for each value not found.

HTH


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=473739



All times are GMT +1. The time now is 10:06 PM.

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