COUNT IF - CRITERIA
Hello Team,
I have the following data to work on:
22-123
22-456
22-789
23-123
23-456
23-789
24-123
24-456
24-789
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
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.1K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 460 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 461 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!