Forgive my title, I wasn't sure how to write it down.

I'm creating an excel sheet to help serve as a probability calculator and I'm in need of a fairly crazy formula. I've drastically dumbed down my excel file for the sake of size but the principle is still the same

in the attached file you'll see 47 rows (range A1:F47) that represents a few of the possible outcomes you could have when rolling 6 dice. I need a countif formula that does the following:

note: range a1:f47 is named "PROB"

look at every cell in range PROB and only count the cells where the final character in each cell does not equal any of the other characters in it's respective cell.

So, looking at the attachment the countif function would not count cell a1, because the 6th character (a 1) matches at least one of the other 5 characters in cell a1. However, it would count cell b2 because the final character in that cell (number 2) does not match any of the other 5 characters in that cell.

If you need to make the cells in this range text or numbers makes no difference to me. I just need it to count all of the values where the final character in a cell does not match the other characters in that respective cell.

I have theories on how this argument should be constructed but everything I've tried has not worked.

Thanks

## Bookmarks