COUNTIF scans the range and compares each numeric cell to the threshold using the < operator, counting only the cells whose value is strictly less than the threshold. The operator and the threshold go together inside one pair of double quotes — "<20" works, but splitting the operator outside the quotes produces a syntax error. The comparison is strict, so a cell that exactly equals the threshold is not included in the count. If you want to include the boundary use "<=" instead, which covers less than or equal to. Blank cells and cells that contain text are silently skipped because comparison operators only evaluate numbers — this is almost always the behaviour you want, but it can surprise you when a column you thought was pure numbers contains a few text entries. For dates, the same formula works because dates are stored as sequential numbers internally, so a date before your threshold has a smaller serial number and is counted. When the threshold should come from another cell rather than being hard-coded, concatenate the < operator with the cell using & — exactly the same pattern as in the
count cells greater than a value formula.