Match and If formula

You could just strip the numbers - check Marek’s variable part way down this topic: