I have an excel example below, how do i create a formula to count the number of full days, holiday, unplanned etc to a person only like tom.

I have done a countif formula which counts all if it matches holiday but cannot get it down to count holidays to only tom's or tien's row.

Thanks for your help