Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
sarahp
 
Posts: n/a
Default Help with vlookup formula


Hi,

I have two separates excel worksheets.

Worksheet no 1 which has two columns : A ( XP numbers) and B ( DOI
numbers)

Worksheet no 2 which has several columns : A ( XP numbers) to O

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

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

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

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=471403

  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

In Worksheet 2, cell B1:

=IF(ISNA(MATCH(A1,Sheet1!A:A,FALSE)), "",
VLOOKUP(A1,Sheet1!A:B,2,FALSE))

In article ,
sarahp wrote:

Hi,

I have two separates excel worksheets.

Worksheet no 1 which has two columns : A ( XP numbers) and B ( DOI
numbers)

Worksheet no 2 which has several columns : A ( XP numbers) to O

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

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

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

Many thanks

Sarah

  #3   Report Post  
Jon Quixley
 
Posts: n/a
Default


Sarah,

On a nerw workbook set up some random numbers in sheet 1 cells A4 to
A17 and in column B enter some numbers occasionally in cells B4 through
to B17 (don't fill all of them). In Sheet two copy column A from sheet
one to two and copy the formula below into cell B4 and copy this down
to b17.

You will need to adapt the formula (at the bottom) a little to fit your
needs, but basically this it it

So what does it all do? - Well, you have two formulae sitting one
inside the other. The VLOOKUP(a4,sheet1!$a$4:$b$17,2,true) part does
the following things: The formula instructs the cell to look at cell A4
(this is on sheet 2) and then go to a block of data on sheet 1 between
cells a4 and b17 - it then reads down the first column until it finds a
number that matches the number it has found in a4 on sheet2. Having
found this number it goes 2 columns over - that is to column B and
returns the number that it finds there.

The next part of the formula sets up a filter to place a blank in
column B on sheet 2 if it can't find a number or the number is zero in
column B on sheet 1 - This is the first part where it says
=IF(+VLOOKUP(A4,Sheet1!A4:B17,2,TRUE)=0," ". If the number is more than
zero then the second part kicks in and you get a number in column B in
sheet 2 that matches its mate on sheet 1
If you are having trouble with this once you've set the whole thing up,
try clicking on the fx symbol next to the formula bar and it should tell
you what the formula should be doing

Good luck!
Jon

This part you copy and paste:
=IF(+VLOOKUP(A4,Sheet1!$A$4:$B$17,2,TRUE)=0,"
",+VLOOKUP(A4,Sheet1!$A$4:$B$17,2,TRUE))


--
Jon Quixley
------------------------------------------------------------------------
Jon Quixley's Profile: http://www.excelforum.com/member.php...o&userid=25803
View this thread: http://www.excelforum.com/showthread...hreadid=471403

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup formula - Excel Version 2002 biz Excel Worksheet Functions 1 September 26th 05 07:01 PM
Need Vlookup to work with formula in reference cell mikeburg Excel Discussion (Misc queries) 2 August 5th 05 12:54 AM
What can I add to a vlookup formula to give me a 0 not #n/a Casper Excel Worksheet Functions 4 July 5th 05 05:32 AM
Using Vlookup in formula arrays BartDesc Excel Worksheet Functions 4 July 3rd 05 04:42 PM
Vlookup formula using tax yables constance Excel Worksheet Functions 1 April 28th 05 04:36 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"