Count Ifs Specific Year
I am trying to Count Ifs the word "Bidding" appears in a column based on the Bid date being in 2024.
=COUNTIFS({Electrical Status}, CONTAINS([Primary Column]@row, @cell), {Bid Date}, YEAR(@cell) = 2024)
this is what i have (primary column is referencing the word bidding).
I am pretty sure it has something to do with the date portion, maybe because there is TBD in the column as well.
Source Sheet
Sheet with Calculations
Help much appreciated!
Answers
-
I don't think you need the CONTAINS part, try this. You should be getting the answer of 0.
=COUNTIFS({Electrical Status}, [Primary Column]@row, {Bid Date}, YEAR(@cell) = 2024)
-
Hi @Eric Law,
thanks for your response!
Unfortunately, that still didn't work. My formula worked without the date range and criteria. I should be getting the answer of 1 because there is 1 project listed "bidding" with the date of 1/15/24.
-
So, I do know the the YEAR function gets kind of... buggy when it's referencing a different sheet. Would you be able to put a year column in your main sheet and reference that column?
-
I would preferrrrr not to. i did successfully use the YEAR function the same sheet just a couple rows above:
=SUMIFS({Sell Price Elect}, {Date Capture}, YEAR(@cell) = 2024)
this returned everything fine.
I was wondering if maybe i needed to include some sort of If error because the Bid Date column had some non dates in it ("TBD").
-
=COUNTIFS({Electrical Status}, [Primary Column]@row, {Bid Date}, IFERROR(YEAR(@cell), 0) = 2024)
okay so i think this worked!
-
That makes sense! I always forget about throwing in an IFERROR.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!