# Excel Networkday formula - Replicate action in easymorph

I have been struggling to replicate the network day formula (excel) in easy morph. Has anyone does this? Will appreciate help.

NETWORKDAYS(H3,A3)

H column = Opened date

A column = Reporting date

Hi @ARORASHRUTI,

it’s a bit non-trivial. Give me a day or two to figure out a solution.

1 Like

Here is my solution:

Assuming that `[DateA]` comes before `[DateB]` this expression calculates the net number of workdays between `[DateA]` (inclusive) and `[DateB]` (inclusive):

``````min([DateB], weekstart([DateB]-1)+5) - max([DateA], weekstart([DateA]+1)+1) - ((weekstart([DateB]-1)-weekstart([DateA]+1))/7) * 2 + 1
``````

Some tests and comparison with Excel:
networkdays.morph (8.7 KB)
Dates.xlsx (18.0 KB)

1 Like

Thank you so much . You are a rockstar

You’re welcome!

To make things simpler we’ve added two new functions to EasyMorph:

• workdays() - an equivalent to NETWORKDAYS() in Excel
• isweekend() - returns TRUE for Saturdays and Sundays

Amazing - Thank you 