Answers.Body: <p>Although clunky you could consider using Microsoft Excel to do most of the work for you. </p>
  
  <ol>
  <li>On Brickset search for the first part </li>
  <li>On the top bar click CSV or (comma separated values) </li>
  <li>Copy the text</li>
  <li>Open Excel (I'm using 2010)</li>
  <li>Select Cell A1</li>
  <li>In the top right corner click the arrow bellow paste and select "Import Text Wizard..." (depending on the version this option may be in another place) </li>
  <li>Selected Delimited and click next</li>
  <li>On the following page select "Comma" click next</li>
  <li>Select each row that is not "SetID" and select "Do Not Import" click finish (alternatively you can manually delete the extra rows after finish)</li>
  <li>Repeat steps for the second part you are looking for. However Select Cell B1 instead of A1. You'll end up with two rows of SetIDs </li>
  <li>Finally highlight both columns of SetIDs and select "Conditional Formatting", >"Highlight Cell Rules"> "Duplicate Values"</li>
  </ol>
  
  <p>The cells that are highlighted will be the sets that contain both parts. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-06T19:45:18.253Z
Answers.Text: that will definitely work but it's not efficient enough for me.
Answers.UserDisplayName: Craig
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-06T19:28:58.007Z
Answers.LastActivityDate: 2017-01-06T19:28:58.007Z
Answers.UserDisplayName: user8172
Answers.Body: <p>From what I can tell, there is no way to cross-reference within the site itself, but it wouldn't be difficult to write a short code to do the cross-checking for you. </p>
  
  <p>I'm not a programmer or web-developer, so I lack any basic coding skills, but for someone who is more able, this would be a very simple task. After you open the page that gives the list of sets containing said part (one page for each of the parts you're looking for) you can easily find all sets sharing two parts by having your browser run a Jscript that does the following:</p>
  
  <ol>
  <li><p>Generates a list of all set numbers that contain said part (one list per page)</p></li>
  <li><p>Generates a list of all set numbers that are shared in all previous lists</p></li>
  </ol>
  
  <p>Let me know if that is confusing... </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-04T19:14:49.247Z
Answers.Text: Not confusing at all, I'm a programmer by day. I just hoped someone had written the code for me already :-)
Answers.UserDisplayName: Craig
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-04T21:04:27.003Z
Answers.Text: Hah! You lazy bum, you :) Although my older bro wrote a more complicated script than what I described in under 10 minutes, but hey, I can't blame you for trying to save 10 minutes :)
Answers.UserDisplayName: SlicksterTheBrickster
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-06T01:11:37.090Z
Answers.Text: Neither of the sites I know, BrickSet and BrickLink, have useful APIs for searching for the sets a part is in. The in-browser script you mention could be a GreeseMonkey type script but it would have to screen-scrape the target site and that sort of work can be fragile.
Answers.UserDisplayName: Craig
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-06T04:14:55.707Z
Answers.Text: Unfortunately, I only understood about half of what you said =/ I would suggest asking this question on another forum about how to easily extract that information from the page so that you can run the matching script. Because I have no idea. Hopefully someone with more programming knowledge will come along....
Answers.UserDisplayName: SlicksterTheBrickster
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-06T06:06:33.773Z
Answers.Text: Also, you may be able to work around that by using the tab function. That way the script doesn't actually search the page for part numbers, since every part is an equal number of 'tabs' apart from each other.
Answers.UserDisplayName: SlicksterTheBrickster
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-07T07:39:32.307Z
Answers.Text: I can handle the tech, just don't want to waste my time doing it if there is a site that has already done it.
Answers.UserDisplayName: Craig
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-07T15:35:25.943Z
Answers.Text: Understood :P Good luck in your search
Answers.UserDisplayName: SlicksterTheBrickster
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-04T17:38:26.890Z
Answers.LastActivityDate: 2017-01-04T17:38:26.890Z
Answers.UserDisplayName: SlicksterTheBrickster
Answers.Body: <p><a href="http://rebrickable.com" rel="nofollow noreferrer">http://rebrickable.com</a> has an advanced search option that allows you to search for parts within specific sets, that might be able to help you.</p>
  
  <p>It also has an API that returns the sets containing a specific part: <a href="http://rebrickable.com/api/docs?fn=get_part_sets" rel="nofollow noreferrer">http://rebrickable.com/api/docs?fn=get_part_sets</a> - although this does require the inclusion of a colour as well. From that you could write a simple comparison between the two results. However this probably won't scale all that well if you then want to find the number of sets containing 10 specific elements.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-06T01:09:23.343Z
Answers.Text: I don't see how that helps. I have two parts A and B and I want to find all the sets that contain both of them.
Answers.UserDisplayName: Craig
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-06T19:35:44.757Z
Answers.Text: Thanks Zhaph, that is very useful. I think it will be quite fast even with 10 lists because the algorithm would start with the shortest list and look for those sets in the other lists, remove any that aren't found and come out with only common sets. Your response is different enough from Andrew's that that it should be its own answer.
Answers.UserDisplayName: Craig
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-09T09:56:09.267Z
Answers.Text: It's not like I needed the rep, and it was on the basis of Andrew's original answer that I went to check rebrickable as I thought I recalled it having an API that could be used for this.
Answers.UserDisplayName: Zhaph - Ben Duguid
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-05T23:05:28.233Z
Answers.LastActivityDate: 2017-01-06T10:30:43.627Z
Answers.LastEditDate: 2017-01-06T10:30:43.627Z
Answers.UserDisplayName: Andrew
Body: <p>I use BrickSet.com to easily find all sets containing a specific part e.g. <a href="http://brickset.com/sets/containing-part-374726" rel="nofollow noreferrer">http://brickset.com/sets/containing-part-374726</a>. Is there a way on that site or any other to find all the sets containing two specific parts?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-07T07:56:49.967Z
Comments.Text: Someone gave the answer by editing someone else's answer to point out rebrickable's API. I've now got a simple call that fetches all the sets with one part in it, can can knock together a script to do the rest, but it looks like they have deleted the whole answer. If they come back with it I'll give them the points.
Comments.UserDisplayName: Craig
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-07T12:51:13.173Z
Comments.Text: I have un-deleted the answer that was deleted by the poster. If you would like to improve on the answer given or add your own answer to explain how you achieved this that would be great.
Comments.UserDisplayName: Ambo100
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-07T23:10:34.103Z
Comments.Text: Zhaph addition to the answer was the real solution here, but it wasn't really related to Andrew's answer I'm going to use the API and write an answer explaining how.
Comments.UserDisplayName: Craig
Tags: <set-identification><set-database>
Title: How to cross reference multiple parts in sets?
UserDisplayName: Craig
ThreadText: # How to cross reference multiple parts in sets?
  
  (Asked by: username_0 on 2017-01-04)
  
  I use BrickSet.com to easily find all sets containing a specific part e.g. <http://brickset.com/sets/containing-part-374726>. Is there a way on that site or any other to find all the sets containing two specific parts?
  
  **Tags:** set-identification, set-database
  > **Comments:**
  > **username_0**: Someone gave the answer by editing someone else's answer to point out rebrickable's API. I've now got a simple call that fetches all the sets with one part in it, can can knock together a script to do the rest, but it looks like they have deleted the whole answer. If they come back with it I'll give them the points.  
  > **username_1**: I have un-deleted the answer that was deleted by the poster. If you would like to improve on the answer given or add your own answer to explain how you achieved this that would be great.  
  > **username_0**: Zhaph addition to the answer was the real solution here, but it wasn't really related to Andrew's answer I'm going to use the API and write an answer explaining how.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2017-01-06. Score: 3
  
  Although clunky you could consider using Microsoft Excel to do most of the work for you.
  
  1. On Brickset search for the first part
  2. On the top bar click CSV or (comma separated values)
  3. Copy the text
  4. Open Excel (I'm using 2010)
  5. Select Cell A1
  6. In the top right corner click the arrow bellow paste and select "Import Text Wizard..." (depending on the version this option may be in another place)
  7. Selected Delimited and click next
  8. On the following page select "Comma" click next
  9. Select each row that is not "SetID" and select "Do Not Import" click finish (alternatively you can manually delete the extra rows after finish)
  10. Repeat steps for the second part you are looking for. However Select Cell B1 instead of A1. You'll end up with two rows of SetIDs
  11. Finally highlight both columns of SetIDs and select "Conditional Formatting", >"Highlight Cell Rules"> "Duplicate Values"
  
  The cells that are highlighted will be the sets that contain both parts.
  
  > **Comments:**
  > **username_0**: that will definitely work but it's not efficient enough for me.  
  
  ---
  
  ### Answer by username_3 on 2017-01-04. Score: 2
  
  From what I can tell, there is no way to cross-reference within the site itself, but it wouldn't be difficult to write a short code to do the cross-checking for you.
  
  I'm not a programmer or web-developer, so I lack any basic coding skills, but for someone who is more able, this would be a very simple task. After you open the page that gives the list of sets containing said part (one page for each of the parts you're looking for) you can easily find all sets sharing two parts by having your browser run a Jscript that does the following:
  
  1. Generates a list of all set numbers that contain said part (one list per page)
  2. Generates a list of all set numbers that are shared in all previous lists
  
  Let me know if that is confusing...
  
  > **Comments:**
  > **username_0**: Not confusing at all, I'm a programmer by day. I just hoped someone had written the code for me already :-)  
  > **username_3**: Hah! You lazy bum, you :) Although my older bro wrote a more complicated script than what I described in under 10 minutes, but hey, I can't blame you for trying to save 10 minutes :)  
  > **username_0**: Neither of the sites I know, BrickSet and BrickLink, have useful APIs for searching for the sets a part is in. The in-browser script you mention could be a GreeseMonkey type script but it would have to screen-scrape the target site and that sort of work can be fragile.  
  > **username_3**: Unfortunately, I only understood about half of what you said =/ I would suggest asking this question on another forum about how to easily extract that information from the page so that you can run the matching script. Because I have no idea. Hopefully someone with more programming knowledge will come along....  
  > **username_3**: Also, you may be able to work around that by using the tab function. That way the script doesn't actually search the page for part numbers, since every part is an equal number of 'tabs' apart from each other.  
  > **username_0**: I can handle the tech, just don't want to waste my time doing it if there is a site that has already done it.  
  > **username_3**: Understood :P Good luck in your search  
  
  ---
  
  ### Answer by username_4 on 2017-01-05. Score: 0
  
  <http://rebrickable.com> has an advanced search option that allows you to search for parts within specific sets, that might be able to help you.
  
  It also has an API that returns the sets containing a specific part: <http://rebrickable.com/api/docs?fn=get_part_sets> - although this does require the inclusion of a colour as well. From that you could write a simple comparison between the two results. However this probably won't scale all that well if you then want to find the number of sets containing 10 specific elements.
  
  > **Comments:**
  > **username_0**: I don't see how that helps. I have two parts A and B and I want to find all the sets that contain both of them.  
  > **username_0**: Thanks Zhaph, that is very useful. I think it will be quite fast even with 10 lists because the algorithm would start with the shortest list and look for those sets in the other lists, remove any that aren't found and come out with only common sets. Your response is different enough from Andrew's that that it should be its own answer.  
  > **username_5**: It's not like I needed the rep, and it was on the basis of Andrew's original answer that I went to check rebrickable as I thought I recalled it having an API that could be used for this.  
  
  ---
  
  