Excel-match in col, copy some of match's data

Closed
cap1816
Posts
2
Registration date
Sunday April 18, 2010
Status
Member
Last seen
April 18, 2010
- Apr 18, 2010 at 03:35 PM
kaiyasit
Posts
30
Registration date
Sunday August 9, 2009
Status
Member
Last seen
April 20, 2010
- Apr 19, 2010 at 10:50 PM
I have been struggling with a formula - help!
I want to copy data from one sheet to another but only if there is an exact match of data.

I need help with the structure of the formula - I can massage it later to fit the specifics.

First, I need to find any exact match of the text in D1 of Doc1 to any row in column E of Doc2.


If there is a match, then:
from that match's row in Doc2, I want to enter the data from column A into column B of L1's row in Doc1.
If there is no match, nothing happens.

Can anyone help? Spent hours trying to set this up. I need the formula -- or if someone knows how to write a macro to do this, that would work too.

Thanks
Doc1						
	A	B	C	D	E	F
1				AB		
2				CD		
3				ED		
4				GH		
5				IJ		
6				KL		
						
Doc2						
	A	B	C	D	E	
1	4				NO	
2	6				ST	
3	-4				ED	
4	5				MO	
5	5				IJ	
6	-5				AB	
7	2				CD	
8	5				KL	
						
						
Doc1						
	A	B	C	D		
1		-5		AB		
2		2		CD		
3		-4		ED		
4				GH		
5		5		IJ		
6		5		KL		

XP / Internet Explorer 8.0</config>

2 replies

If it's possible to place or copy Doc2's column A to Doc2's column F, you could simply use Vlookup.
1
kaiyasit
Posts
30
Registration date
Sunday August 9, 2009
Status
Member
Last seen
April 20, 2010
12
Apr 19, 2010 at 10:50 PM
yes, use vlookup
but in Doc2 you have to move the column E to A
if not move the vlookup will be not work.

example 1
=VLOOKUP(D1,[Book4]Sheet1!$A:$B,2,0)

example 2
=IF(ISNA(VLOOKUP(D1,[Book4]Sheet1!$A:$B,2,0)),"",VLOOKUP(D1,[Book4]Sheet1!$A:$B,2,0))

This may be help you.
kaiyasit phanmakorn
0