Q:

Can you have wildcard characters in a cell in an IF statement? 

I am trying to set up a table that will allow for very quick classification of sites across about 50 different characteristics.  The method I have thought of but am unsure if it's possible is as follows. 

Worksheet A: the raw data about 100R x 50C with each cell
describing a characteristic of that row where the last column is the
overall classification. 
Worksheet B: a table of about 5R x 50C with the columns
corresponding to the columns in Worksheet A.

A row of Worksheet B would look something like:
* | * | * | 1 | * | 3 | * | Y | * | ... | * | * | * |

And a row from Worksheet A that corresponds with this data would look something like:
A | B | C | 1 | 5 | 3 | Z | Y | 1 | ... | F | 2 | X | High Priority 

Where the asterisks indicate a wildcard where I don't care what the content is.  All of the other cells would be required conditions.  Then I was thinking of applying an array formula on the last column to get the classification.  Something like:
{=IF(AND(A2:BV2='Worksheet B'!$A$2:$BV$2), "High Priority", "Low Priority")}

But Excel takes the asterisks as literal string content and evaluates it as FALSE. 
Is there a way to make this work?  Or an alternative method that would be just as simple to implement? 

A:

I got to the bottom of it with a reasonably elegant solution.  Please post criticisms if there is a situation where this won't work. 
={IF(SUM(IF(A2:BV2='Worksheet B'!A2:BV2,0,1))=COUNTIF('Worksheet B'!A2:BW2,"x"),"Top Priority", "Low Priority")}

Where x is for those cells in which I don't care about the outcome.  So instead of "*", I am using "x" in the cells above such that Worksheet B is more like:
x | x | x | 1 | x | 3 | x | Y | x | ... | x | x | x |

If anyone is interested, the formula works by counting all of the mismatched elements and checking them against the number of cells with "x" in the result.  If these two numbers are equal, the number of mismatches is equal to the number of cells we don't care about.