Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Using networkdays when either cell is blank

0

Hi guys. I have two cells with different dates - E2 and H2. I want to know the network days between the two but also want the result to show:

- as blank if E2 is left blank

And/or

- Using todays date if H2 is left blank.

So far I have -

=NETWORKDAYS (E2,(IF(H2='''',TODAY(),H2))

Any idea how i add in if E2 is left blank then theres no result also?

Many thanks

Answer
Discuss

Answers

1
Selected Answer

NOTE: I believe I was in cell J5 (not J2)

=IF(AND(E5="",H5=""),"",IF(H5="",NETWORKDAYS(E5,TODAY(),),NETWORKDAYS(E5,H5)))

1st condition test if BOTH E & H are empty; remainder computes networkdays.

Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login