I was wondering if there is a simple method to check if an array (or it could be a range in a sheet) has unique values?

The idea is that I need to use an 26 array (or a range from B1 to B26) and each cell has to have an unique number from 1 to 26.

I want to find the right combination of digits in the array that will solve a math equation.

I want to cycle each cell till I find the match

Is there a simple routine to do that?