COUNT IF  CRITERIA
Hello Team,
I have the following data to work on:
22123
22456
22789
23123
23456
23789
24123
24456
24789
Where the first 22, 23 and 24 represent 2022, 2023, 2024.
I'm trying to use the "COUNTIF" formula to count them by using, the 22, 23 and 24 as criteria, to know how many items I have per year, however it shows me 0.
How should I enter the formula to count them correctly?
Thanks in advance!
Answers

Hi @DG 13 , try this formula where your data is entered into a column called "Year Val":
=COUNTIF([Year Val]:[Year Val], LEFT(@cell, 2) = 22)
Let me know if further help needed!
Best,
Will

Hi @Will Jeffords , Thanks for tackling my question, the colum where I have the data is "Coded Name".
I entered your suggested formula this way: =COUNTIF([Coded Name]:[Coded Name], LEFT([Coded Name], 2) = 22) But did not work.
Any other suggestion? 
hi @DG 13 the second half needs to be exactly “LEFT(@cell, 2) =22)”
Try that instead of “LEFT(Coded Name…”
Let me know if fixes!
Best
Will

Hi @Will Jeffords!
It brought the #UNPARSEABLE error.
I changed it, I put it this way now =COUNTIF([Coded Name]:[Coded Name], LEFT(@cell, 2) =22)
Help Article Resources
Categories
Check out the Formula Handbook template!