days calculations

K

Kimti

I have sheet with some dates as follows:

a b c
1 01-jan-00 09- feb-09
2 23-feb-09 08-mar-09

I want to calculate working days in column c between two dates in a an b
columns. I was using following formula and getting, "#NAME?"
=NETWORKDAYS(A1,B1)
Plaese help to reactify this error.
Thank you in advance for your help.
Kimti
 
J

Jacob Skaria

--First of all check whether the dates are in excel/date format. To enter a
date you can try Ctrl+ ; (semicolon) and then edit the date to suit

--NETWORKDAYS() is a function availble in Analysis ToolPak. Check whether
you have installed ATP . To install; from menu Tools>AddIns> check 'Analysis
ToolPak' and hit OK.

--Alternate solution
=SUM(INT((WEEKDAY(A1-{1,2,3,4,5},2)+B1-A1)/7))

If this post helps click Yes
 
K

Kimti

Thank you for your help. It worked good with installing analysis toolpak. One
more question: if my column b is empty is it possible to consider current
date in the column and keep increasing number in column c until I place the
date in column b.
 
J

Jacob Skaria

Sure; you can try the below

=NETWORKDAYS(A1,IF(B1="",TODAY(),B1))

If this post helps click Yes
 
K

Kimti

It worked the way I wanted. Another thing, I copied the formula in column c
all the way to row 200. But I don't have the data in all the rows. If a and b
column is blank, column c still gave me some numbers whereas I wanted to see
column c blank as well.
 
J

Jacob Skaria

Try

=IF(A1="","",NETWORKDAYS(A1,IF(B1="",TODAY(),B1)))


If this post helps click Yes
 

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