I think this does it. I’m not sure it is the most efficient way of getting there but it does seem to work. It can take some time for it to check all possible combinations. It appears there are about 36000 unique combinations that can be generated from 9 numbers.

It is not in the format shown but that could be easily changed.

By using klintsovi suggestion, you could avoid unnecessary checking.