Formula

D

Dave

What I want the formula to do is when a start date is entered and no end
date for the cell to display a 1. If both a start date and end date is
entered then use the networkdays function to calculate the days.

I've applied this formula without success: =IF((ISBLANK(B1)),1, networkdays
(A1,B1))

Where: A1=24/02/2006, B1=26/02/2006
Therefore the formula should calculate the networkdays=2.

If A1=24/02/2006, B1=ISBLANK Then the formula should calculate =1.

Does anyone have any ideas to make this work.
 
B

Biff

Hi!

Try this:

=IF(COUNT(A1,B1)=0,"",IF(AND(ISNUMBER(A1),B1=""),1,NETWORKDAYS(A1,B1)))

Assumes A1 will *NEVER* be empty while B1 has an entry.
Therefore the formula should calculate the networkdays=2.

The Networkdays is 1:

24/02/2006 = Friday
26/02/2006 = Sunday

Biff
 
D

David Biddulph

The formula is OK, though you could have omitted one unnecessary pair of
brackets and used
=IF(ISBLANK(B1),1,NETWORKDAYS(A1,B1))
The answer from NETWORKDAYS with those inputs is 1, however.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top