RockandGrohl
Well-known Member
- Joined
- Aug 1, 2018
- Messages
- 801
- Office Version
- 365
- Platform
- Windows
Using the formula here:
https://exceljet.net/formula/index-and-match-with-multiple-criteria
I have an index-match setup with about 5 or 6 different criteria. for simplicity sake, let's say there are only two criteria
[TABLE="class: grid, width: 800, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]FRUIT[/TD]
[TD]SIZE[/TD]
[TD]PRICE[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]BANANA[/TD]
[TD]10[/TD]
[TD]£6.50[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]BANANA[/TD]
[TD]10[/TD]
[TD]£4.80[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]BANANA[/TD]
[TD]8[/TD]
[TD]£3.60[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]BANANA[/TD]
[TD]8[/TD]
[TD]£3.45[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
The issue here is where we have two matching criteria (FRUIT & SIZE) however there are two different prices.
On the next table where we want the results, it may be something like this:
[TABLE="class: grid, width: 800, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]FRUIT[/TD]
[TD]SIZE[/TD]
[TD]PRICE[/TD]
[TD]TIER[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]BANANA[/TD]
[TD]10[/TD]
[TD][/TD]
[TD]EXPENSIVE[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]BANANA[/TD]
[TD]10[/TD]
[TD][/TD]
[TD]CHEAP[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]BANANA[/TD]
[TD]8[/TD]
[TD][/TD]
[TD]EXPENSIVE[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]BANANA[/TD]
[TD]8[/TD]
[TD][/TD]
[TD]CHEAP[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So the problem is that it will happily match the first 2 criteria and always give me the top result, in the above case that's £6.50 and £3.60 respectively.
How do I make it so that if it's already found a match, it finds the next available unique match in the list?
Obviously my example of Apples and Bananas and whatever isn't applicable. My problem is that I have template names, sizes and days of the week it runs in which are a few different criteria, but there's still a couple situations where the criteria is the same but I need different results.
Hope this makes sense.
****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="class: grid, width: 800, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]FRUIT[/TD]
[TD]SIZE[/TD]
[TD]PRICE[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]BANANA[/TD]
[TD]10[/TD]
[TD]£6.50[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]BANANA[/TD]
[TD]10[/TD]
[TD]£4.80[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]BANANA[/TD]
[TD]8[/TD]
[TD]£3.60[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]BANANA[/TD]
[TD]8[/TD]
[TD]£3.45[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
</body>
https://exceljet.net/formula/index-and-match-with-multiple-criteria
I have an index-match setup with about 5 or 6 different criteria. for simplicity sake, let's say there are only two criteria
[TABLE="class: grid, width: 800, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]FRUIT[/TD]
[TD]SIZE[/TD]
[TD]PRICE[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]BANANA[/TD]
[TD]10[/TD]
[TD]£6.50[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]BANANA[/TD]
[TD]10[/TD]
[TD]£4.80[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]BANANA[/TD]
[TD]8[/TD]
[TD]£3.60[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]BANANA[/TD]
[TD]8[/TD]
[TD]£3.45[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
The issue here is where we have two matching criteria (FRUIT & SIZE) however there are two different prices.
On the next table where we want the results, it may be something like this:
[TABLE="class: grid, width: 800, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]FRUIT[/TD]
[TD]SIZE[/TD]
[TD]PRICE[/TD]
[TD]TIER[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]BANANA[/TD]
[TD]10[/TD]
[TD][/TD]
[TD]EXPENSIVE[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]BANANA[/TD]
[TD]10[/TD]
[TD][/TD]
[TD]CHEAP[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]BANANA[/TD]
[TD]8[/TD]
[TD][/TD]
[TD]EXPENSIVE[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]BANANA[/TD]
[TD]8[/TD]
[TD][/TD]
[TD]CHEAP[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So the problem is that it will happily match the first 2 criteria and always give me the top result, in the above case that's £6.50 and £3.60 respectively.
How do I make it so that if it's already found a match, it finds the next available unique match in the list?
Obviously my example of Apples and Bananas and whatever isn't applicable. My problem is that I have template names, sizes and days of the week it runs in which are a few different criteria, but there's still a couple situations where the criteria is the same but I need different results.
Hope this makes sense.
****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="class: grid, width: 800, align: left"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]FRUIT[/TD]
[TD]SIZE[/TD]
[TD]PRICE[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]BANANA[/TD]
[TD]10[/TD]
[TD]£6.50[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]BANANA[/TD]
[TD]10[/TD]
[TD]£4.80[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]BANANA[/TD]
[TD]8[/TD]
[TD]£3.60[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]BANANA[/TD]
[TD]8[/TD]
[TD]£3.45[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
</body>