Change formula in P2 to:
Confirmed with CTRL+SHIFT+ENTER...
As far as the last 2 entries of 27... I believe they are correct as the formulas produce them... There is an entry of 27 in Row 4, column 1.. which would come before the entry in row 5, column 10. There are 12 27's in your matrix, if you copy down another entry of 27 and copy down the respective formulas, you will get the next expected results of Row 5, Column 9.
Please see attached...where I created the next entry of 27 in red and show expected result.s
Bookmarks