Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
heyes
 
Posts: n/a
Default Intersect operations


Dear Community,

I hope you can help...

I have 2 MS Excel 1 column tables. I would like to perform an
'Intersect Operation' on both tables, thus creating one table of
entries which appear in both of the original tables.

EG. I want to create tableC = tableA AND tableB

NOTE: I do not want to simply have the data of both tables joined
together. This is a Union operation. I want data which appears in
both A and B. NOT A or B.

I understand a spreadsheet is not a database, but surely this is
possible in MS Excel... if not, can anyone think of a speedy
alternative???


--
heyes
------------------------------------------------------------------------
heyes's Profile: http://www.excelforum.com/member.php...o&userid=31506
View this thread: http://www.excelforum.com/showthread...hreadid=511839

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Intersect operations

How about a little work.

Start a new worksheet
copy the data from sheet1 to A1 of the new sheet
copy the data from Sheet2 under that list in column A of the new sheet.
(include a single header row in row 1)

Now you have a giant list in column A--but it may have duplicates.

Select column A of that new worksheet.
Data|Filter|advanced filter
copy to another location (Use B1 of that new sheet)
Check unique records only

(Debra Dalgleish has some notes at:
http://contextures.com/xladvfilter01.html)

Now column B contains a unique list based on both sheets.

Delete column A.

In B1, put: On Sheet1
In C1, Put: On Sheet2

In B2:Bxxx, put:
=isnumber(match(a2,sheet1!a:a,0))

in c2:Cxxx, put:
=isnumber(match(a2,sheet2!a:a,0))

Apply data|filter|autofilter to columns A:C.

Show only the Trues in column B and the Trues in column C.
and copy to a new location

or
show false in column b and delete those rows
then show false in column c and delete those rows

heyes wrote:

Dear Community,

I hope you can help...

I have 2 MS Excel 1 column tables. I would like to perform an
'Intersect Operation' on both tables, thus creating one table of
entries which appear in both of the original tables.

EG. I want to create tableC = tableA AND tableB

NOTE: I do not want to simply have the data of both tables joined
together. This is a Union operation. I want data which appears in
both A and B. NOT A or B.

I understand a spreadsheet is not a database, but surely this is
possible in MS Excel... if not, can anyone think of a speedy
alternative???

--
heyes
------------------------------------------------------------------------
heyes's Profile: http://www.excelforum.com/member.php...o&userid=31506
View this thread: http://www.excelforum.com/showthread...hreadid=511839


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid
 
Posts: n/a
Default Intersect operations

heyes,

Since you are using set-theoretic terminology, I assume that the two
sets will not contain duplicates. If so, and you want to do it with
formulas, assume that set 1 is in A1:A11 and set 2 is in B1:B5. The
following formulas will produce the intersection in column D:D,
starting from D1 (no error checking for empty intersection).

in D1: (array formula, to be commited with Shift+Ctrl+Enter)
=INDEX(A1:A11,MIN(IF(ISNUMBER(MATCH(A1:A11,B1:B5,0 )),ROW(A1:A11))))

in D2: (also array formula)
=INDEX($A$1:$A$11, MATCH(1,(COUNTIF($D$1:D1,
$A$1:$A$11&"")=0)*ISNUMBER(MATCH($A$1:$A$11,$B$1:$ B$5,0)),0))

Copy D2 down until you see #N/A

HTH
Kostis Vezerides

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
heyes
 
Posts: n/a
Default Intersect operations


Very Clever!

Thank you very much! That's perfect ;)


--
heyes
------------------------------------------------------------------------
heyes's Profile: http://www.excelforum.com/member.php...o&userid=31506
View this thread: http://www.excelforum.com/showthread...hreadid=511839

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid
 
Posts: n/a
Default Intersect operations

Glad to know it worked for you. It was in my to-do list to produce a
formula for this anyway :)

Regards

Kostis Vezerides



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
How can I add more dates to the employee operations timesheet Daycare Excel Worksheet Functions 1 May 18th 05 11:42 PM
Operations with hidden cells Hiughs Excel Worksheet Functions 1 March 2nd 05 07:41 PM
Document, if supported, operations with text arrays. i.e: count i. RagDyer Excel Worksheet Functions 2 February 9th 05 07:41 PM
how to get the intersect cell data out using vba or function mango Excel Worksheet Functions 1 December 30th 04 09:46 AM
How do I perform operations within a funtion that operates on colu crander8 Excel Discussion (Misc queries) 3 November 29th 04 10:15 PM


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