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
- 63.1K Get Help
- 381 Global Discussions
- 212 Industry Talk
- 444 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 450 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 291 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!