Counting workdays to the present day

Sambrowne

New Member
Joined
Sep 13, 2016
Messages
46
Office Version
  1. 365
Platform
  1. MacOS
Probably been asked a million times but really struggling to find the right answer. I need to count the workdays since a specific date but need it to update on the day it opens. For example in A1 I type the activity as started on 1 Dec 20 and so in A2 it would say 8 (working days) when I open it today. When I open the doc on Monday it would say 9, Tues 10 and so on.

Column A1 is where the dates would sit but some may be blank until a date is entered so the formula would need to be able to cope with an empty field.

Hope I'm making sense, can always screenshot the spreadsheet if that helps.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
How about
Excel Formula:
=IF(A1="","",NETWORKDAYS.INTL(A1,TODAY())-1)
 
Upvote 0
How about
Excel Formula:
=IF(A1="","",NETWORKDAYS.INTL(A1,TODAY())-1)

Wow, that was quick and worked a charm - thanks! Can I be cheeky and ask another question? I need to colour code the cells at the same time so less than or equal to 15 should be green, 16-19 should be amber and 20+ would be red. Any ideas?
 
Upvote 0
You can use conditional formatting for that & use
Excel Formula:
=AND(A2<>"",A2<=15)
=AND(A2<>"",A2<=19)
=A2>=20
 
Upvote 0
Somewhat typically I have another question based on what went before but a bit more complex. Not sure if I'm straying into Pivot Table territory though. In my table I have Col L that has an initial date and in N I have an end date. In O I want to calculate the number of workdays between L and N. So far so easy but here's where it gets complicated.

L feeds N so if L has a date in it but N doesn't, I want the the cell in O to count the workdays since the date in L until a date is entered at which point in it counts the workdays between the two. For example, if the date in L is 1 Dec but no end date in N and I open the doc on 5th Dec, O should say 4, if I open it on 9th Dec it should say 7, open it on 10th it should say 8 and so on.

However, as soon as I enter a date in N, let's say 20 Dec, then O should calculate the workdays between 1st and 20th (14 workdays) and stop counting. I'd also like to colour code it as before. Is any of that possible? I tried to post a screenshot of my table but apparently it's too big, do you know the size that will fit?

Thanks for any help you can offer.
 
Upvote 0
T202012a.xlsm
LMNO
1Today isFri 11-Dec-20
2Workdays
3Mon 09-Nov-20Mon 30-Nov-2016
4Tue 01-Dec-209
5Tue 01-Dec-20Sat 05-Dec-204
6Tue 01-Dec-20Wed 09-Dec-207
7Fri 04-Dec-20Mon 07-Dec-202
8Fri 04-Dec-20Fri 11-Dec-206
9Fri 04-Dec-206
10Fri 04-Dec-20Fri 11-Dec-206
8b
Cell Formulas
RangeFormula
O3:O8O3=NETWORKDAYS(L3,IF(N3="",TODAY(),N3))
O9:O10O9=NETWORKDAYS.INTL(L9,IF(N9="",TODAY(),N9),1)


Edit depending on your definition of Workdays. Mon - Fri?
Consider Holidays. List?
Review Excel's Help for Networkdays and Networkdays.intl

 
Upvote 0
Thanks very much for this, really helpful. I have another question though, can the formula take into account an empty cell in L? In my screenshot above L11, 17 and 20 are empty, awaiting dates but with your formula it currently displays 31555. Not sure what to do next, any ideas?
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,412
Members
448,959
Latest member
camelliaCase

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