Both of them worked! Thank you!!

oh and how can I add an additional criteria to that formula? I added it in columns D & E "S/NS" and "SUP"
I manually added A & B so that you can see the results needed.

Thank you!
Formula Help2.xlsx