NETDAYS with Contains...or maybe IF....


I have a multi-select column and a created date column(System). Im trying to get the netdays since at least one selection in the multi select was chosen and a row was created for it. I know Im missing a CONTAINS in here...I is appreciated.

=IF(Pri/Sec/Base/Water/Sand @row = "Primary", TODAY() - [Created] @row, "")


  • Danielle O'Connell
    Danielle O'Connell ✭✭✭✭✭

    You're really close. Try this:

    =IF([Pri/Sec/Base/Water/Sand]@row = "primary", NETDAYS([Created]@row, TODAY()), "")

    My assumption is the Pri/Sec/Base/Water/Sand is the column name. Make sure you put brackets around it. If it isn't the column name, the whatever column would have "primary" replace that column name in the formula.

  • Cristina Andersen

    Danielle, I received an Unparseable error. You assumed correctly about the column name. Is it worth re-mentioning that the column is multi-select which means it will have (possibly) more than one option in there. Also this is going on a Sheet Summary which I dont think should make a difference but....

    =IF([Pri/Sec/Base/Water/Sand]@row = "Primary", NETDAYS([Created]@row, TODAY()), "")

  • Danielle O'Connell
    Danielle O'Connell ✭✭✭✭✭
    edited 03/24/21

    @Cristina Andersen Do you mean that the Pri/Sec/etc column is the drop down? If that is the case the formula should still work but it would give you the false - blank cell when Primary has other options too.

    So I tried to replicate your situation with a multi-select and a date column:

    =IF([Pri/Sec/Base/Water/Sand]@row = "primary", NETDAYS(Created@row, TODAY()), "-")

    Is the formula and it appears to be working based on my setup with Created being formatted as a date column and the other one as a multiselect.

    Try that first and see if it works. So long as it does, it's pretty easy to get it updated with CONTAINS (like you mentioned above) to do the number of days for any that have primary.

    =IF(CONTAINS("Primary", [Pri/Sec/Base/Water/Sand]@row), NETDAYS(Created@row, TODAY()), "-")

    If the formulas still don't work let me know and maybe send a screenshot (black out sensitive info) so I can see what we have different.

  • Cristina Andersen

    Danielle, Im still getting an error. My example is below.

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    edited 04/05/21

    Hi @Cristina Andersen

    I hope you're well and safe!

    EDIT, I just noticed that you want to add it to the sheet summary, and you can't use @row in the sheet summary.

    I'll get back to the post later if Danielle hasn't answered then.

    I hope that helps!

    Be safe and have a fantastic week!


    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    Did my post(s) 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!


    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: | | 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

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!