NETWORKDAYS Formula using TODAY() not returning expected results
I'm using a Formula to calculate the pays past due from today. The current formula I'm using is =NETWORKDAYS([Due Date],TODAY()), but the results aren't coming out as I would have anticipated.
9/29/2021 returns 2 days past due
9/30/2021 returns 1 day past due
10/1/2021 returns -2 days past due
So, I created a formula that works in excel: =NETWORKDAYS([Due Date],TODAY())-(TODAY()>=[Due Date])+([Due Date]>=(TODAY()+1)) and this gives the results:
9/29/2021 returns 1 day past due
9/30/2021 returns 0 days past due
10/1/2021 returns -1 day past due
However, when I use the formula in SmartSheet, the returned result is #INVALID OPERATION.
Can someone help me figure out what the correct formula would be to get the same results I'm getting when I use that formula in excel?
Best Answer
-
Here you go:
=IF(Date@row <= TODAY(), NETWORKDAYS(Date@row, TODAY()) - 1, NETWORKDAYS(Date@row, TODAY()) + 1)
Answers
-
Try this:
=NETWORKDAYS(Date@row, TODAY()) - 1
-
Oops! Don't try that :-) It works for dates in the past, but not future dates. Working on it.... give me a minute
-
So, I tried that too, and the result works for any days that were before today or the current day, but it makes the next day -3 rather than -1. I need some kind of formula that would subtract 1 from the current day and any days before the current day and add 1 to any days in the future. The formula I used in excel seems to do the trick, but when I use it SS I end up with the error. Struggling trying to figure out an equivalent formula.
-
Here you go:
=IF(Date@row <= TODAY(), NETWORKDAYS(Date@row, TODAY()) - 1, NETWORKDAYS(Date@row, TODAY()) + 1)
-
That did it! Much appreciated!
-
I need help as well:
if Date Submitted = blank then calculate number of days from Date to Vendor to today.
Thank you!
Wina
-
Try something like this:
=IF([Date Submitted]@row = "", NETWORKDAYS([Date to Vendor]@row, TODAY()))
See: NETWORKDAYS Function
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 138 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives