Not so pretty IF-function (works) but needs makeover

Keeping track on vacation time I need to convert dates to weeks and then again to an overview with checkboxes.

In order to get a list of weeks [c_weeks_listed] (later in use with FIND) I have come up with the following IF-formula which works but will become too complex if expanded further.

Any ideas for a more powerful formula (Lookup? or ??)

=IF([c_week diff]@row < 1; [c_vacation week, start]@row; IF([c_week diff]@row = 1; [c_vacation week, start]@row + ", " + ([c_vacation week, start]@row + 1); IF([c_week diff]@row = 2; [c_vacation week, start]@row + ", " + ([c_vacation week, start]@row + 1) + ", " + ([c_vacation week, start]@row + 2); IF([c_week diff]@row = 3; [c_vacation week, start]@row + ", " + ([c_vacation week, start]@row + 1) + ", " + ([c_vacation week, start]@row + 2) + ", " + ([c_vacation week, start]@row + 3)))))


vacation.JPG

Best

Hoff

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!