[TABLE="width: 332"]
<tbody>[TR]
[TD]KIT 1[/TD]
[TD]KIT 2[/TD]
[TD]KIT 3[/TD]
[TD]KIT 4[/TD]
[/TR]
[TR]
[TD]APPLES[/TD]
[TD]ORANGES[/TD]
[TD]APPLES[/TD]
[TD]LIMES[/TD]
[/TR]
[TR]
[TD]BANANAS[/TD]
[TD]WATERMELON[/TD]
[TD]LEMONS[/TD]
[TD]ORANGES[/TD]
[/TR]
[TR]
[TD]ORANGES[/TD]
[TD][/TD]
[TD]ORANGES[/TD]
[TD]WATERMELON[/TD]
[/TR]
</tbody>[/TABLE]
Lets say I have these kits. I would like to write a macro that allows me to search through all kits and return the kit names that have certain (multiple) components in them.
For example, I would like to have put two criteria (apples AND oranges) into A1 and A2, run the macro, then have it spit out KIT 1 and KIT 3 because those have both apples and oranges.
Any thoughts? I've tried a few things, but nothing seems to work well. Also, the order of the components are not always in the same place, so oranges could appear before apples or show up in the 5th and 9th spot.
<tbody>[TR]
[TD]KIT 1[/TD]
[TD]KIT 2[/TD]
[TD]KIT 3[/TD]
[TD]KIT 4[/TD]
[/TR]
[TR]
[TD]APPLES[/TD]
[TD]ORANGES[/TD]
[TD]APPLES[/TD]
[TD]LIMES[/TD]
[/TR]
[TR]
[TD]BANANAS[/TD]
[TD]WATERMELON[/TD]
[TD]LEMONS[/TD]
[TD]ORANGES[/TD]
[/TR]
[TR]
[TD]ORANGES[/TD]
[TD][/TD]
[TD]ORANGES[/TD]
[TD]WATERMELON[/TD]
[/TR]
</tbody>[/TABLE]
Lets say I have these kits. I would like to write a macro that allows me to search through all kits and return the kit names that have certain (multiple) components in them.
For example, I would like to have put two criteria (apples AND oranges) into A1 and A2, run the macro, then have it spit out KIT 1 and KIT 3 because those have both apples and oranges.
Any thoughts? I've tried a few things, but nothing seems to work well. Also, the order of the components are not always in the same place, so oranges could appear before apples or show up in the 5th and 9th spot.