# Duration column formula: two situations

Options
✭✭✭✭
edited 10/27/21

Hello,

I have three date columns involved in the duration:

Date Submitted

Date Completed

For Future Requests

My current duration formula only uses the Date Submitted and Date Completed columns:

=IF(Status@row <> "Complete", NETWORKDAYS([Date Submitted]@row, TODAY()), NETWORKDAYS([Date Submitted]@row, [Date Completed]@row))

I want to create a formula that incorporates two situations: 1) number of weekdays between Date Submitted and Date Completed when "Future Request" is unchecked or 2) number of weekdays between For Future Requests and Date Completed when "Future Request?" is checked.

Any help is much appreciated!

Tags:

## Best Answers

• Employee Admin
edited 11/03/21 Answer ✓
Options

Hi @Brooks

Try this:

=IF([Future Request]@row = 0, IF(Status@row <> "Complete", NETWORKDAYS([Date Submitted]@row, TODAY()), NETWORKDAYS([Date Submitted]@row, [Date Completed]@row)), IF(Status@row <> "Complete", NETWORKDAYS([For Future Requests]@row, TODAY()), NETWORKDAYS([For Future Requests]@row, [Date Completed]@row))

It repeats your same formula... once for if the checkbox is 0, or un-checked, and then again if the checkbox is 1, but swapping out [Date Submitted]@row for [For Future Requests]@row .

Let me know if this works for you!

Cheers,

Genevieve

• Employee Admin
Answer ✓
Options

No problem! You can just add another statement right at the front:

=IF(Progress@row <> "Future Request", IF([Future Request]@row = 0, IF(Status@row <> "Complete", NETWORKDAYS([Date Submitted]@row, TODAY()), NETWORKDAYS([Date Submitted]@row, [Date Completed]@row)), IF(Status@row <> "Complete", NETWORKDAYS([For Future Requests]@row, TODAY()), NETWORKDAYS([For Future Requests]@row, [Date Completed]@row)), "")

This will be Blank if it's a Future Request. Does this do what you would like it to?

Cheers!

Genevieve

## Answers

• Employee Admin
edited 11/03/21 Answer ✓
Options

Hi @Brooks

Try this:

=IF([Future Request]@row = 0, IF(Status@row <> "Complete", NETWORKDAYS([Date Submitted]@row, TODAY()), NETWORKDAYS([Date Submitted]@row, [Date Completed]@row)), IF(Status@row <> "Complete", NETWORKDAYS([For Future Requests]@row, TODAY()), NETWORKDAYS([For Future Requests]@row, [Date Completed]@row))

It repeats your same formula... once for if the checkbox is 0, or un-checked, and then again if the checkbox is 1, but swapping out [Date Submitted]@row for [For Future Requests]@row .

Let me know if this works for you!

Cheers,

Genevieve

• ✭✭✭✭
Options

Thanks, @Genevieve P.!

• ✭✭✭✭
Options

Is there a way to edit this formula so that the above formula only works if the Progress column does not display "Future Request"?

Thanks for your assistance!

• Employee Admin
Answer ✓
Options

No problem! You can just add another statement right at the front:

=IF(Progress@row <> "Future Request", IF([Future Request]@row = 0, IF(Status@row <> "Complete", NETWORKDAYS([Date Submitted]@row, TODAY()), NETWORKDAYS([Date Submitted]@row, [Date Completed]@row)), IF(Status@row <> "Complete", NETWORKDAYS([For Future Requests]@row, TODAY()), NETWORKDAYS([For Future Requests]@row, [Date Completed]@row)), "")

This will be Blank if it's a Future Request. Does this do what you would like it to?

Cheers!

Genevieve

• ✭✭✭✭
edited 11/03/21
Options

Perfect, @Genevieve P. Thanks so much for your help! I am still getting to know IF clauses.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!