Is there any software around that can take most of the trial-and-error out of matching transistors? I googled for a while but didn't find what I'm looking for...

Here's an example to better explain what I'm looking for:

First of all we might as well as not be talking about any kind of parts here that might be matched - resistors, capacitors, bjts, jfets; anything really. Things like passive components with one value each or NPN's with hFE only make things easy, but it may get more complex if you consider multiple values like hFE and VBE, or JFETs with Vgs(off), gfs and ID at the same time.

I'll keep it simple for now, so let's say I have measured a batch of NPN's for their hFE and now want to have some pairs and some quads out of that batch. The pairs are no big problem usually - just put all the data into a spreadsheet, sort for the value in question and pick some adjacent parts as pairs. The quads take somewhat more time to find, as soon as all the quads are supposed to be matched against each other.

So I've picked my pairs first and now want to have four quads out of the remainder with their final hFE close to each other quad. If I'm left with 16 parts of all the same hFE, this is not a problem. But if the remaining parts are spread out over something like 20%, I'd be having a hard time picking an arbitrary quad, calculate the total hFE, pick another quad, calculate total hFE, compare, swap a single part for a closer match, then pick the third quad, ... and so on.

I'm thinking of a software that can be fed with the measured part values, regardless of what those values actually mean, like resistance, capacitance, VBE, gfs, you name it. A single value for a single part would probably be all that's needed most of the time. Then I want to specify what I'm looking for, like groups of 2/4/6/8/n and probably how many of those groups and to which tolerance. Click a button and wait for the results.

There would be two approaches for the software to take now: 1) simply find the groups with the closest tolerance possible (good to make the most out of the remaining parts) and spit out all the combinations together with the tolerance value, or 2) specify a number N and let the software find N groups with a tolerance within a given range. This would be great for cases where there're not enough "good" groups close enough - Say you have three groups within 3% but the next one is only 10% already. Then you would specify 4 groups and 10%, and the software would try the possible combinations and might probably find 4 groups matched to 5%.

Imagine doing this with a spreadsheet and a batch of 200 parts....

Another (third) approach might be to specify an average value and let the software find a given number of pairs/quads/whatever to a tolerance around that value. That'd probably be useful only if you had a really huge number of parts, though.

For a moment I have actually considered writing my own tool just for this purpose, but eventually came to this conclusion:

So If you know of any kind of software that somehow does anything (or everything) of the aforementioned, please let me know .

Here's an example to better explain what I'm looking for:

First of all we might as well as not be talking about any kind of parts here that might be matched - resistors, capacitors, bjts, jfets; anything really. Things like passive components with one value each or NPN's with hFE only make things easy, but it may get more complex if you consider multiple values like hFE and VBE, or JFETs with Vgs(off), gfs and ID at the same time.

I'll keep it simple for now, so let's say I have measured a batch of NPN's for their hFE and now want to have some pairs and some quads out of that batch. The pairs are no big problem usually - just put all the data into a spreadsheet, sort for the value in question and pick some adjacent parts as pairs. The quads take somewhat more time to find, as soon as all the quads are supposed to be matched against each other.

So I've picked my pairs first and now want to have four quads out of the remainder with their final hFE close to each other quad. If I'm left with 16 parts of all the same hFE, this is not a problem. But if the remaining parts are spread out over something like 20%, I'd be having a hard time picking an arbitrary quad, calculate the total hFE, pick another quad, calculate total hFE, compare, swap a single part for a closer match, then pick the third quad, ... and so on.

I'm thinking of a software that can be fed with the measured part values, regardless of what those values actually mean, like resistance, capacitance, VBE, gfs, you name it. A single value for a single part would probably be all that's needed most of the time. Then I want to specify what I'm looking for, like groups of 2/4/6/8/n and probably how many of those groups and to which tolerance. Click a button and wait for the results.

There would be two approaches for the software to take now: 1) simply find the groups with the closest tolerance possible (good to make the most out of the remaining parts) and spit out all the combinations together with the tolerance value, or 2) specify a number N and let the software find N groups with a tolerance within a given range. This would be great for cases where there're not enough "good" groups close enough - Say you have three groups within 3% but the next one is only 10% already. Then you would specify 4 groups and 10%, and the software would try the possible combinations and might probably find 4 groups matched to 5%.

Imagine doing this with a spreadsheet and a batch of 200 parts....

Another (third) approach might be to specify an average value and let the software find a given number of pairs/quads/whatever to a tolerance around that value. That'd probably be useful only if you had a really huge number of parts, though.

For a moment I have actually considered writing my own tool just for this purpose, but eventually came to this conclusion:

So If you know of any kind of software that somehow does anything (or everything) of the aforementioned, please let me know .