To count the number of times a value occurs within a range in Excel, you can use the COUNTIF function. This function counts the number of cells in a range that meet a specified criteria. In this case, the criteria is the value that you want to count.
To use the COUNTIF function, enter the following into a cell:
=COUNTIF(range,value)
Replace "range" with the range of cells that you want to count and "value" with the value that you want to count. For example, if you wanted to count how many times the value "5" occurs in cells A1:A100, you would enter the following into a cell:
=COUNTIF(A1:A100,5)