Hello,
I am trying to trying to loop through a table of rules to pull in the alignment of my data. The keys on the transactional data, which alignment needs to be mapped to, are Account code, Company code, Department code, Channel code, Product code and Region code. The keys on the rules data are Account number, Company, Department, Channel, Product and Region. The Rules have wild characters included. Is there a way to loop through these rules/conditions and pull in the last match?
Below is the original format with rules grouped together.

Below is the same list but I have split out via text to column , split to rows. I replaced All with * and % with *.

Thank you in advance.
Daniel