Skip blank cells with YEAR function
![Paul M Kahl](https://us.v-cdn.net/6031209/uploads/userpics/PMHUAVIRM1QX/nP84LJQRX672T.jpg)
I’m endeavoring a roll up sheet that will provide sum totals from a single row on a separate Planning Request sheet.
If the source sheet has all cells filled out, the formula seems to work fine:
=SUMIFS({Planning Request Range 2}, {Planning Request Range 1}, [Member]1, {Planning Request Range 3}, "Approved", {Planning Request Range 4}, YEAR(@cell) = YEAR(TODAY()))
However, a date in the Range 4 column is blank, I get a #Invalid Data Type error in the roll up sheet.
I’m looking for a recommendation on how to skip blank cells when using the YEAR function as listed, or for a better way to parse out years… the goal will be to break out sums for 2020, 2021, etc
Thanks in advance!
Best Answer
-
Hi Paul,
You’ll need to add an IFERROR function before the YEAR.
Try something like this.
=SUMIFS({Planning Request Range 2}, {Planning Request Range 1}, [Member]1, {Planning Request Range 3}, "Approved", {Planning Request Range 4}, IFERROR(YEAR(@cell),0) = YEAR(TODAY()))
Did that work?
I hope that helps!
Be safe and have a fantastic week!
Best,
Andrée Starå
Workflow Consultant / CEO @ WORK BOLD
✅Did my post help or answer your question or solve your problem? Please help the Community by marking it as the accepted answer/helpful. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
Answers
-
Hi Paul,
You’ll need to add an IFERROR function before the YEAR.
Try something like this.
=SUMIFS({Planning Request Range 2}, {Planning Request Range 1}, [Member]1, {Planning Request Range 3}, "Approved", {Planning Request Range 4}, IFERROR(YEAR(@cell),0) = YEAR(TODAY()))
Did that work?
I hope that helps!
Be safe and have a fantastic week!
Best,
Andrée Starå
Workflow Consultant / CEO @ WORK BOLD
✅Did my post help or answer your question or solve your problem? Please help the Community by marking it as the accepted answer/helpful. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
Hello
This worked exactly as I hoped. Thank you for the help!
Be well!
Paul
-
Excellent!
You're more than welcome!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.1K Get Help
- 348 Global Discussions
- 199 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 133 Brandfolder
- 127 Just for fun
- 127 Community Job Board
- 455 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 282 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!