Skip blank cells with YEAR function
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
- Customer Resources
- 64.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 62 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!