How about
Formula: copy to clipboard
=IF($D$27="","Choose a name in cell D27",SUMPRODUCT(($A$4:$A$24="WfH")*(ISNUMBER(SEARCH(D27,$B$4:$H$24)))))