# COUNTIF

The COUNTIF function returns the count of items that match the specified condition.

## Syntax

```javascript
countif(list, condition)
```

## Arguments

list - List of values. This is a required argument.

condition - The condition to be evaluated. This is a required argument.

## Example

```javascript
COUNTIF([100,500,120],"<200")
```

Returns 2, since only two values in the given list, match the condition

## Excel equivalent

[COUNTIF](https://support.microsoft.com/en-us/office/countif-function-e0de10c6-f885-4e71-abb4-1f464816df34)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inforiver.com/premium-table/formula-syntax/math-functions/countif.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
