COUNTIF and COUNTIFS: How to Count What Matters
COUNTIF counts cells that meet one condition. COUNTIFS counts cells that meet several. =COUNTIF(A2:A100, "Riyadh") =COUNTIFS(A2:A100, "Riyadh", B2:B100, "Hardware") Good news if you've just wrestled with SUMIF and SUMIFS : the argument order doesn't flip here. Adding the S just lets you keep adding range-and-criteria pairs. There's no separate "count range", because you're counting the very cells you're testing. First, which COUNT do you need? Excel has five counting functions and people reach for the wrong one constantly. Function Counts COUNT Cells containing numbers only COUNTA Cells that aren't empty — text, numbers, errors COUNTBLANK Empty cells COUNTIF Cells meeting one condition COUNTIFS Cells meeting several conditions The usual mistake is COUNT on a column of names, which returns 0 because there are no numbers in it. COUNTA is what that job needs. COUNT returns zero o...