Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 87
Default eleminate same records in two tables

Hi everyone,
I have two tables ( 900+ rows , 6 columns) I want to compare these two
tables and if table A has a record with a value in one of its specific
fields(exp "C") that matches with a record filed in table B remove its
record or at least eleminate it in the final report.
table A
A B C
bob fg 3
john ac 2
kim lk 1

table b
D B C
bob fg 1
edward ad 1
john ac 2

second record in table 1 and third record in table b are the same so I want
to delete it from final report
final report
H I G
bob ab 1
edward ad 1


--
Best regards,
Edward
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default eleminate same records in two tables

Some thoughts, illustrated in this sample:
http://www.freefilehosting.net/download/3bkc9
Eliminate dups.xls

Source tables A & B in cols A to C & in cols E to G,
data from row1 down

In I1: =A1&"#"&B1&"#"&C1
In J1: =E1&"#"&F1&"#"&G1
In K1: =IF(ISNUMBER(MATCH(I1,J:J,0)),"",ROW())
In L1: =IF(ISNUMBER(MATCH(J1,I:I,0)),"",ROW())

In N1, copied to P1:
=IF(ROW()COUNT($K:$K),"",INDEX(A:A,SMALL($K:$K,RO W())))

In R1, copied to T1:
=IF(ROW()COUNT($L:$L),"",INDEX(E:E,SMALL($L:$L,RO W())))
Select I1:T1, copy down to cover the max expected extent of source data.
Cols N to P returns Table A less the items found in Table B. Cols R to T
returns similarly for Table B.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Edward" wrote:
Hi everyone,
I have two tables ( 900+ rows , 6 columns) I want to compare these two
tables and if table A has a record with a value in one of its specific
fields(exp "C") that matches with a record filed in table B remove its
record or at least eleminate it in the final report.
table A
A B C
bob fg 3
john ac 2
kim lk 1

table b
D B C
bob fg 1
edward ad 1
john ac 2

second record in table 1 and third record in table b are the same so I want
to delete it from final report
final report
H I G
bob ab 1
edward ad 1


--
Best regards,
Edward

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
Building pivot tables in Excel 2007 based on existing pivot tables? [email protected] Excel Discussion (Misc queries) 4 December 26th 07 08:05 PM
how to eleminate a row that contains 2 cells with zero value aafrinasghar Excel Discussion (Misc queries) 1 July 10th 07 08:54 AM
excel 2003: how to match records of 2 tables according to 2 columns? nk Excel Worksheet Functions 2 July 4th 07 02:22 AM
Records Christine Excel Discussion (Misc queries) 1 January 11th 07 04:29 PM
Unique records Pete Excel Discussion (Misc queries) 1 July 26th 05 06:58 PM


All times are GMT +1. The time now is 06:43 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"