Networkdays

BeeLife

New Member
Joined
Sep 7, 2020
Messages
10
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows
  2. Mobile
Hi there, apologies in advance as I assume my query has been answered at some point in the past, but I haven’t come across a simple solution.

I’m trying to calculate the number of workdays / networkdays (total days excluding weekends) between a start date and end date, but if the end date cell is blank, it assumes ‘today’ is the end date, until an end date is entered.

Hope that makes sense.

Thank you
 

BeeLife

New Member
Joined
Sep 7, 2020
Messages
10
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows
  2. Mobile
I think it should be ....
startdate = today & B1 blank = networkdays between A1 and B1 (should be 1 (or 0 if weekend (unlikely)))
startdate = today & B1 with date = networkdays between A1 and B1
startdate after today & B1 blank = 1
startdate after today & B1 with date =networkdays between A1 and B1 (this already works in the formula)

they’ll always be a start date.

image attached for context
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

BeeLife

New Member
Joined
Sep 7, 2020
Messages
10
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows
  2. Mobile
Image attached this time
 

Attachments

  • 5AD388AF-B8C0-4BAF-B3E9-BFAEBB301FE5.jpeg
    5AD388AF-B8C0-4BAF-B3E9-BFAEBB301FE5.jpeg
    105.9 KB · Views: 5

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,827
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
Rich (BB code):
startdate = today & B1 blank = networkdays between A1 and B1 (should be 1 (or 0 if weekend (unlikely)))
How can the bit in red be true if B1 is blank :unsure:
 

BeeLife

New Member
Joined
Sep 7, 2020
Messages
10
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows
  2. Mobile
Sorry ... it assume B1 is “today” IF today is the startdate.

Most of the formula works as required. It’s just where there is a startdate in the future and blank end date, it counts backwards.
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,827
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile

ADVERTISEMENT

Sorry ... it assume B1 is “today” IF today is the startdate.

Most of the formula works as required. It’s just where there is a startdate in the future and blank end date, it counts backwards.

Sorry to be a pain but should that return 1?
 

BeeLife

New Member
Joined
Sep 7, 2020
Messages
10
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows
  2. Mobile
Yes - by default and it should calculate 1 day.

today + today = 1 day ( assuming today is a networkday)

No need to apologise. I’m taking up your time and I’m extremely grateful for your assistance
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,827
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile

ADVERTISEMENT

See where we are with the below...

Book1
ABC
109/09/20201
Sheet2
Cell Formulas
RangeFormula
C1C1=IF(AND(A1>=TODAY(),B1=""),1,IF(B1<>"",NETWORKDAYS(A1,B1),NETWORKDAYS(A1,TODAY())))
 

BeeLife

New Member
Joined
Sep 7, 2020
Messages
10
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows
  2. Mobile
Perfect! I can’t thank you enough.
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,827
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
You're welcome
 

Watch MrExcel Video

Forum statistics

Threads
1,122,472
Messages
5,596,353
Members
414,060
Latest member
hermanseck

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top