Hello jeex87,

Little bit confuse when looking on your result in the sample file provided.

Try this Array Formula** in B2, then copy down.

=MAX(FREQUENCY(IF(Before!A$2:A$77=A2,Before!B$2:B$77),Before!B$2:B$77))

** confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.