#1   Report Post  
Posted to microsoft.public.excel.misc
cj21
 
Posts: n/a
Default Matching


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: http://www.excelforum.com/member.php...o&userid=25673
View this thread: http://www.excelforum.com/showthread...hreadid=506352

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Matching

In 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:
http://www.contextures.com/xlFunctions02.html (for =vlookup())
and
http://www.contextures.com/xlFunctions03.html (for =index(match()))

cj21 wrote:

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: http://www.excelforum.com/member.php...o&userid=25673
View this thread: http://www.excelforum.com/showthread...hreadid=506352


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
SteveG
 
Posts: n/a
Default Matching


Chris,

=IF(ISNA(INDEX($A$2:$A$10,MATCH($B19,$B$2:$B$10,0) ,1)),"",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: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=506352

  #4   Report Post  
Posted to microsoft.public.excel.misc
cj21
 
Posts: n/a
Default Matching


not to sure how you've got this to work. Could you post an example.

Thanks for the help

Chris


--
cj21
------------------------------------------------------------------------
cj21's Profile: http://www.excelforum.com/member.php...o&userid=25673
View this thread: http://www.excelforum.com/showthread...hreadid=506352

  #5   Report Post  
Posted to microsoft.public.excel.misc
SteveG
 
Posts: n/a
Default Matching


Chris,

Here is an example.




HTH

Steve


+-------------------------------------------------------------------+
|Filename: Index Match.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4280 |
+-------------------------------------------------------------------+

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

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
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
matching and lookup?? eoht Excel Worksheet Functions 3 November 11th 05 01:51 AM
Index/ Lookup formulas and fuzzy matching JaB Excel Worksheet Functions 0 November 10th 05 10:04 AM
Count matching cells The Mage Excel Worksheet Functions 4 September 18th 05 03:36 AM
Matching cells [email protected] Excel Discussion (Misc queries) 0 July 1st 05 02:43 PM


All times are GMT +1. The time now is 06:38 AM.

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

About Us

"It's about Microsoft Excel"