How to make a column number not exceed another column's

Options

I have a column called "Days worked", which I get using:

=IF(NETWORKDAY([Start date]@row; TODAY()) < 0; 0; NETWORKDAY([Start date]@row; TODAY()))

This ensures it won't go below 0.

I want to also make sure it doesn't exceed the number in a column called "Duration".

I tried combining the aforementioned IF with :

IF(NETWORKDAY([Start date]@row; TODAY()) > Duration@row; Duration@row; NETWORKDAY([Start date]@row; TODAY()))

This doesn't work. Does anyone know how to write it properly?

Thank you in advance.

Best Answer

Answers

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    Answer ✓
    Options

    Hi @Frederik Soerensen

    I hope you're well and safe!

    Try something like this.

    =IF(NETWORKDAY([Start Date]@row; TODAY()) > Duration@row; 0; IF(NETWORKDAY([Start Date]@row; TODAY()) < 0; 0; NETWORKDAY([Start Date]@row; TODAY())))

    Did that work/help?

    I hope that helps!

    Be safe and have a fantastic week!

    Best,

    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!

    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.

  • Frederik Soerensen
    Options

    Thank you for the quick answers to both questions.

    It almost works perfectly.

    If the current date exceed the "due date" it will revert to 0 and not to the same number as the "duration".

    This is easily fixed though. Just change it from

    =IF(NETWORKDAY([Start Date]@row; TODAY()) > Duration@row; 0; IF(NETWORKDAY([Start Date]@row; TODAY()) < 0; 0; NETWORKDAY([Start Date]@row; TODAY())))

    to

    =IF(NETWORKDAY([Start date]@row; TODAY()) > Duration@row; Duration@row; IF(NETWORKDAY([Start date]@row; TODAY()) < 0; 0; NETWORKDAY([Start date]@row; TODAY())))

    Wrote the change if anyone else might have this same problem in the future.

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    Options

    @Frederik Soerensen

    Excellent!

    Happy to help!

    Yes, I left it as 0 because I wasn't sure what you wanted to show.

    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.