# How to Count Rows with Value in Excel

To count rows with a specific value in Excel, you can use the COUNTIF function. Here's how you can do that:

- Open Excel and enter your data in the worksheet.
- Identify the range of cells you want to count the rows with a specific value. For example, if your data is in cells A1:A10, your range will be A1:A10.
- Click on an empty cell where you want the result to be displayed.
- Enter the formula using the COUNTIF function. For example, if you want to count the rows with a value of "X" in the range A1:A10, you would enter the following formula:

`=COUNTIF(A1:A10, "X")`

- Press Enter to get the result.

The COUNTIF function will now calculate the number of rows with the specified value in the defined range, and display the result in the selected cell.

## Example

Let's say you have a list of fruits in column A, and you want to count how many times the word "Apple" appears. Your data looks like this:

A |
---|

Apple |

Banana |

Apple |

Orange |

Apple |

To count the number of times "Apple" appears, follow these steps:

- Click on an empty cell, such as B1.
- Enter the formula
`=COUNTIF(A1:A5, "Apple")`

in cell B1. - Press Enter.

The result (3) will be displayed in cell B1, indicating that "Apple" appears three times in the list.

Did you find this useful?