I'm try to perform a look up and cross reference an exclusion list, and would appreciate any help. I want to return the smallest number that who's lookup value is NOT in the exclusion list.
List:
[TABLE="class: grid, width: 225"]
<tbody>[TR]
[TD]#[/TD]
[TD]type[/TD]
[TD]fruit[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]nectarine[/TD]
[TD]orange[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]naval[/TD]
[TD]orange[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]tangerine[/TD]
[TD]orange[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]clementine[/TD]
[TD]orange[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]mcintosh[/TD]
[TD]apple[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]fuji[/TD]
[TD]apple[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]honey crisp[/TD]
[TD]apple[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]gold and delicious[/TD]
[TD]apple[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]honeydew[/TD]
[TD]melon[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]water melon[/TD]
[TD]melon[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]canteloup[/TD]
[TD]melon[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Exclusion List:
[TABLE="class: grid, width: 225"]
<tbody>[TR]
[TD]type[/TD]
[/TR]
[TR]
[TD]nectarine[/TD]
[/TR]
[TR]
[TD]mcintosh[/TD]
[/TR]
[TR]
[TD]water melon[/TD]
[/TR]
</tbody>[/TABLE]
Output:[TABLE="class: grid, width: 225"]
<tbody>[TR]
[TD]fruit[/TD]
[TD]output[/TD]
[TD]should return[/TD]
[/TR]
[TR]
[TD]apple[/TD]
[TD]{formula}[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]honey crisp[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]melon[/TD]
[TD]{formula}[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]canteloupe[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]orange[/TD]
[TD]{formula}[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]tangerine[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
This was my attempt through using arrays(although it doesn't work maybe it can be of some inspiration?):
=VLOOKUP(SMALL(IF(IF(M2=INDEX(list,,3,1),INDEX(list,,2,1),"")=exclusion,MAX(INDEX(list,,1,1))+1,INDEX(list,,1,1)),1),list,2,FALSE)
The above formula is using the named ranges for the tables listed above.
Any help would be greatly appreciated!
Thanks!
Ghrain22
List:
[TABLE="class: grid, width: 225"]
<tbody>[TR]
[TD]#[/TD]
[TD]type[/TD]
[TD]fruit[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]nectarine[/TD]
[TD]orange[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]naval[/TD]
[TD]orange[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]tangerine[/TD]
[TD]orange[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]clementine[/TD]
[TD]orange[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]mcintosh[/TD]
[TD]apple[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]fuji[/TD]
[TD]apple[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]honey crisp[/TD]
[TD]apple[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]gold and delicious[/TD]
[TD]apple[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]honeydew[/TD]
[TD]melon[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]water melon[/TD]
[TD]melon[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]canteloup[/TD]
[TD]melon[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Exclusion List:
[TABLE="class: grid, width: 225"]
<tbody>[TR]
[TD]type[/TD]
[/TR]
[TR]
[TD]nectarine[/TD]
[/TR]
[TR]
[TD]mcintosh[/TD]
[/TR]
[TR]
[TD]water melon[/TD]
[/TR]
</tbody>[/TABLE]
Output:[TABLE="class: grid, width: 225"]
<tbody>[TR]
[TD]fruit[/TD]
[TD]output[/TD]
[TD]should return[/TD]
[/TR]
[TR]
[TD]apple[/TD]
[TD]{formula}[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]honey crisp[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]melon[/TD]
[TD]{formula}[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]canteloupe[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]orange[/TD]
[TD]{formula}[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]tangerine[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
This was my attempt through using arrays(although it doesn't work maybe it can be of some inspiration?):
=VLOOKUP(SMALL(IF(IF(M2=INDEX(list,,3,1),INDEX(list,,2,1),"")=exclusion,MAX(INDEX(list,,1,1))+1,INDEX(list,,1,1)),1),list,2,FALSE)
The above formula is using the named ranges for the tables listed above.
Any help would be greatly appreciated!
Thanks!
Ghrain22