A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi!
Welcome to the Microsoft Q&A forum.
Your formula itself is correct. =COUNTIF(H2:H1590,"specifictext").
The error you have “This value doesn’t match the data validation restrictions defined for this cell” indicates the problem is likely the cell where the formula is being entered, not your formula itself.
First, select the cell where you are entering the COUNTIF formula. Then go to Data → Data Validation and select the Settings tab. Check the Allow option to see what type of restriction is applied to the cell. If the cell has a restriction such as List, Whole number, Decimal, or Custom, that restriction may be preventing the formula from being entered. If you do not need the data validation, select Clear All and click OK. Finally, enter the COUNTIF formula into the cell again and check whether it is accepted.
Let me know if this fixes it. If not, let me know so I can assist you further.