I have 2 seperate data sets. The first gives a list of product codes and
a code. The second just gives the product code. e.g:
Dataset 1
Code Product code
01 02034953
01 02394685
01 04056606
02 05045677
02 05233456
02 90455439
03 04563956
Dataset 2
Product code
02034953
02394685
04056606
05045677
05233456
90455439
04563956
I want a way to get the code from dataset 1 to dataset 2(obviously
matching products). Copying and pasting won't work because some of the
product codes in dataset 1 are not included in dataset 2.
Thankyou for your help
Chris--
cj21
------------------------------------------------------------------------
cj21's Profile: www.excelforum.com/member.php...oamp;userid=25673
View this thread: www.excelforum.com/showthread...hreadid=506352In sheet2:
in B2 (headers in row 1)
=index(sheet1!a:a,match(a2,sheet1!b:b,0))
You may want to read Debra Dalgleish's notes:
www.contextures.com/xlFunctions02.html (for =vlookup())
and
www.contextures.com/xlFunctions03.html (for =index(match()))
cj21 wrote:
gt;
gt; I have 2 seperate data sets. The first gives a list of product codes and
gt; a code. The second just gives the product code. e.g:
gt;
gt; Dataset 1
gt; Code Product code
gt; 01 02034953
gt; 01 02394685
gt; 01 04056606
gt;
gt; 02 05045677
gt; 02 05233456
gt; 02 90455439
gt;
gt; 03 04563956
gt;
gt; Dataset 2
gt;
gt; Product code
gt; 02034953
gt; 02394685
gt; 04056606
gt; 05045677
gt; 05233456
gt; 90455439
gt; 04563956
gt;
gt; I want a way to get the code from dataset 1 to dataset 2(obviously
gt; matching products). Copying and pasting won't work because some of the
gt; product codes in dataset 1 are not included in dataset 2.
gt;
gt; Thankyou for your help
gt;
gt; Chris
gt;
gt; --
gt; cj21
gt; ------------------------------------------------------------------------
gt; cj21's Profile: www.excelforum.com/member.php...oamp;userid=25673
gt; View this thread: www.excelforum.com/showthread...hreadid=506352
--
Dave Peterson
Chris,
=IF(ISNA(INDEX($A$2:$A$10,MATCH($B19,$B$2:$B$10,0) ,1)),quot;quot;,INDEX($A$2:$A$10,MATCH($B19,$B$2:$B$10,0), 1))
Where your Data Set 1 is A2:B10. B19:B26 is Data set 2 and A19:A26 is
where I put the formula to return the Code from Data Set 1.HTH
Steve--
SteveG
------------------------------------------------------------------------
SteveG's Profile: www.excelforum.com/member.php...foamp;userid=7571
View this thread: www.excelforum.com/showthread...hreadid=506352
not to sure how you've got this to work. Could you post an example.
Thanks for the help
Chris--
cj21
------------------------------------------------------------------------
cj21's Profile: www.excelforum.com/member.php...oamp;userid=25673
View this thread: www.excelforum.com/showthread...hreadid=506352
Chris,
Here is an example.
HTH
Steve -------------------------------------------------------------------
|Filename: Index Match.zip |
|Download: www.excelforum.com/attachment.php?postid=4280 |
-------------------------------------------------------------------
--
SteveG
------------------------------------------------------------------------
SteveG's Profile: www.excelforum.com/member.php...foamp;userid=7571
View this thread: www.excelforum.com/showthread...hreadid=506352
- Aug 14 Mon 2006 20:09
Matching
close
全站熱搜
留言列表
發表留言