Your current formula does not prefer match by any column. It just searches top-bottom for first row, where all conditions are met and returns the tool no from this row.
So we have to somehow organize the results (assign weights to rows fulfilling all required conditions) and find the best fit. A proposition could be for instance:
Yes, I know it's long :-) but basically its just repeated twice almost the same formula.
we create a reference table with weights (and empty strings if not all conditions are met):
and calculate minimum value in this table. Then we take INDEX(ToolNos,MATCH(ourMin, OurTable,0))
I thought it could be in a tricky way (assuming in AE you have only values less than for instance 1000) made a bit shorter.
Shows it's not - the same length. Probably also similar computing time. So may be better stay with the first one.
As opposite to original, this formula do not accept presence of errors in Container Tool sheet. There was one caused by a space (not real empty cell) in a cell D294. I deleted it.
See attached file if it works the way you looked for. BTW. In case of 2 or more valuse optimal from the point of view of AE column we will end up again with situation that topmost of the tools meening all conditions and having optimal value of AE column is selected.
Bookmarks