Calculating workdays between two dates when one cell is blank, or return no if zero

SaraWitch

Active Member
Joined
Sep 29, 2015
Messages
322
Office Version
  1. 365
Platform
  1. Windows
Hello all.

I am trying to calculate the number of working days (and not counting Bank Holidays) between two cells (minus 1 day) and if the second is empty use today's date.

I can find the actual days with "=IF($X3="",TODAY(),$X3-$W3-1)", but this obviously counts all days and not just working days minus Band Holidays.

I would also like to return a blank cell result if no columns have dates.

Any help would be appreciated!

Ta muchly, folks!
Sara
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Thank you for your reply.

However, this will only calculate if dates are in both cells. If the second cell is empty, I want to use today's date. If both cells are empty, I want a blank return, rather than "43440" which is currently showing!

Ta muchly!
 
Upvote 0
Quick update: I have used "=IF($X3>0,$X3-$W3,TODAY()-$W3)", which is almost there, but does not calculate working days or return blank if both cells are empty...
 
Upvote 0
Try the following formula. This assumes that bank holidays and other holiday dates are entered into cells AF2:AF26, so change this range to suit your holiday date list.

=IF(AND($W3="",$X3=""),"",IF(AND($W3<>"",$X3=""),NETWORKDAYS($W3,TODAY(),$AF$2:$AF$26),NETWORKDAYS($W3,X3,$AF$2:$AF$26)))
 
Upvote 0
Hello there.

Sorry for the delay - Christmas and all that!!

This formula is great; thank you. However, it is returning result of 1 when the days are the same so should be 0. I have tried minusing 1, but it doesn't seem to work...?
 
Upvote 0
Try this amended formula (again it assumes that bank holidays and other holiday dates are entered into cells AF2:AF26):

=IF(AND($W3="",$X3=""),"",IF(AND($W3<>"",$X3=""),NETWORKDAYS($W3,TODAY(),$AF$2:$AF$26)-1,NETWORKDAYS($W3,X3,$AF$2:$AF$26)-1))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,784
Messages
6,121,538
Members
449,038
Latest member
Guest1337

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
Back
Top