LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 296
Default Matching Records in two tables

Hi,

I have two tables which I'm attempting to link with a common key
field. Table 1 contains all the records from table 2, plus additional
records not on table 2. Table 2 contains records that are not in table
1.

The field I'm matching on is common to both, and many records contain
the same key field value, but differences in other fields.

The task is to get the data from a non common field in table 2, and
add these field values to the table 1 records where the key field
matches.

I've tried to use an =MATCH() function, in table 1 to find the
equivalent row in table 2, but of course where there are more than one
record with the same key value, the MATCH() returns the same row
number. For instance with values A,B,C,C,C,D in table 2 rows 1:6, and
the same record values somewhere in table1, using a match in table
1for say value C in table 2, returns row 3 for the three 'C' values,
and not rows 3,4 & 5

I was hoping to use this Match value to either sort table 1 into
exctly the same order as table 2, and then copy the non common field
from table 2 into table1. Or alternatively loop down table 2 with a
macro and identify which rows need blank rows introducing to line up
with table 1.

I guess I need some variety of a countif() or sumproduct() function,
but I've not yet found the right flavour.

Can anyone offer any advice please?

Usual TIA


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
 
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
Find matching records James[_4_] Excel Discussion (Misc queries) 2 September 6th 07 02:07 PM
Matching records and posting them separately. esbee Excel Worksheet Functions 0 September 2nd 07 04:10 AM
Matching records RayB Excel Discussion (Misc queries) 1 July 18th 06 05:31 PM
Matching the same amount of records in one value to another column dodat Excel Worksheet Functions 1 January 1st 06 08:51 PM
Unique records of matching pairs pmarques Excel Worksheet Functions 0 October 25th 05 05:23 PM


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

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"