Add a date (first of month)

lmarantos
lmarantos ✭✭✭✭
edited 11/16/22 in Formulas and Functions

Hi there! We have a smartsheet that is for program enrollment. The program start date is the first day of the following month after the enrollee's start date (so, if they start on 11.15 in their office, their program start date is 12.1). I originally used: Β 

=DATE(YEAR([Net Add Start Date]@row), MONTH([Net Add Start Date]@row) + 1, 1)

as my formula and it has worked just fine until now. Those who are starting in December and therefore have a program start date in January are now showing #invalid value errors, seemingly because of the year change. I have researched the IFERROR formulas and came up with this:

=IFERROR(DATE(YEAR([Net Add Start Date]@row), MONTH([Net Add Start Date]@row) + 1, 1), DATE(YEAR([Net Add Start Date]@row) + 1, MONTH([Net Add Start Date]@row) – 11, 1)))

Which does show the correct current information like I previously had, but still doesn't fix the year change issue and still shows an error. I am stumped!

Lindsey Marantos, PhD

Talent Programs Manager, Total Rewards
Heartland Dental

Tags:

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!