To count items from a list or table, you can use the COUNTIFS function. In our example, the formula used is:
How the formula works
The formula has following arguments:
criteria_range1 (A5:A9)- The range of cells to count based on criteria1.
criteria1 (“B”) – The criteria, to count party B only in range1
criteria_range2 (B5:B9) – The 2nd range of cells to count based on criteria2
criteria2 (“5”) – The criteria to count $5 sale only.