From: Justin Larson on
On one sheet I've got a large dataset containing products with many fields.
On another sheet, I've got a list of criteria that the products cannot

Both the list of criteria and the product list is quite long, so I've set up
a DCOUNT formula in a field on the products list to evaluate each line to see
if it violates any rules from the criteria. Right now that field just reports
back a 1 or 0 (1 meaning it violated a rule and is disallowed).

What I'd like to do, is have it report back which criteria was matched. i.e.
the formula evalates the criteria as a whole, is there a way to evaluate the
line, one criteria at a time and report back the location of the rule (or
name) when it reaches one that matches?

VBA may be the most common answer, though I'm hoping for a magic formula
that I didn't think of.

Alternatively, based on this description, is there a better way to go about
evaluating if a product is allowed, based on a long list of criteria than
using a database function?