Calculate working days between two dates using today's date if one cell is blank

SaraWitch

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

I have a formula that works out the number of working days, minus bank holidays, between two dates and if the second date is blank calculate using today's date.

The first date is in column AD and the second is in column AZ. I have a list of bank holidays in another sheet. I have had to minus a day because my formula always returned one day over the actual number of days! This is my working formula:

=IF($AZ5="",NETWORKDAYS($AD5,TODAY()-1,Lookups!$AI$3:$AI$10),NETWORKDAYS($AD5,$BA5-1,Lookups!$AI$3:$AI$10))

However, I want a blank cell if the first date in column AN is blank. My attempts so far have not been successful! The latest I have tried is:

=IF($AZ5="",NETWORKDAYS($AD5,TODAY()-1,Lookups!$AI$3:$AI$10),NETWORKDAYS($AD5,$BA5-1,Lookups!$AI$3:$AI$10),IF($AD5="",""))

Any help would be greatly appreciated...🙏
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Sorry peeps!

Figured it out! I had AD column in the wrong place!

=IF($AD5="","",IF($AZ5="",NETWORKDAYS($AD5,TODAY()-1,Lookups!$AI$3:$AI$10),NETWORKDAYS($AD5,$BA5-1,Lookups!$AI$3:$AI$10)))

Thank you anyway if someone had a chance to look at this! 😆
 
Upvote 0
Solution

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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