A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Use this formula:
=IF(B4="",0,SUMPRODUCT(--(B6:Q6=B4:Q4)))
If B4 is empty, the formula returns 0. If B4 contains a value, it compares B6:Q6 against B4:Q4 and counts the number of cells that match.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin