Sort into subfolder w/ pattern of custom attribute WRONG

Hi!!
I need help and I'm not sure what I'm doing wrong!
I have files in this format
NAME OF HEAD COMPANY_CONTACT NAME_NAME OF SUB COMPANY .EXT
(note that the end of name of sub company can also be "_#_.ext", it's not uniform every time).
I've created a custom attribute that matches NAME OF HEAD COMPANY_ and sorts the files there.
I've then created a custom attribute that sorts those files into another subfolder that matches _CONTACT NAME_
The last and final piece is trying to get the files to then sort themselves into a subfolder of NAME OF SUB COMPANY.
If I make a rule where name matches ANYTHING_ANYTHING (_WORD WORD_), where (_WORD WORD_) is the custom attribute, it continuously sorts the files into another subfolder with the pattern _CONTACT NAME_. I can't get it to look past this and instead match to _NAME OF HEAD COMPANY_.
I'm very new to hazel - please let me know if you have any tips!
I need help and I'm not sure what I'm doing wrong!
I have files in this format
NAME OF HEAD COMPANY_CONTACT NAME_NAME OF SUB COMPANY .EXT
(note that the end of name of sub company can also be "_#_.ext", it's not uniform every time).
I've created a custom attribute that matches NAME OF HEAD COMPANY_ and sorts the files there.
I've then created a custom attribute that sorts those files into another subfolder that matches _CONTACT NAME_
The last and final piece is trying to get the files to then sort themselves into a subfolder of NAME OF SUB COMPANY.
If I make a rule where name matches ANYTHING_ANYTHING (_WORD WORD_), where (_WORD WORD_) is the custom attribute, it continuously sorts the files into another subfolder with the pattern _CONTACT NAME_. I can't get it to look past this and instead match to _NAME OF HEAD COMPANY_.
I'm very new to hazel - please let me know if you have any tips!