View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gaurav[_2_] Gaurav[_2_] is offline
external usenet poster
 
Posts: 207
Default Within another function calculate and sum number of days

What formula you want to add the days to? I just used SUM(D2:D10) as an
example.


"Detroit David" wrote in message
...
Thank you for your help, however I could not get the formula to work.
I set up a simple matrix (see below) and tried to use the formula on it.
Note: the column to the right of "D" has the "network days" calculated
for
verification

The formula as written did not seem to work I tried several variations of
it. I tried a few variations but nothing worked. If I changed the date
values
in the first set the result in formula 2 would change to that value.

=IF(C1="Done",NETWORKDAYS(A2,B2)+SUM(D2:D10),SUM(D 2:D10))
Gave a result of "0"


=IF(C2="Done",NETWORKDAYS(A2,B2)+SUM(D2:D10),SUM(D 2:D10))
Gave a result of "5"

It only calculates the first line, how does one establish a range (i.e.
C1:C10)

What am I doing wrong?

Thank you for you patience.



A B C D
1 Date End Date Status
2 02/06/08 02/12/08 Done 5
3 02/06/08 02/14/08 Done 7
4 02/06/08 02/26/08 Done 15
5 03/05/08 On-Hold
6 03/05/08 03/28/08 Done 18
7 03/05/08 On-Hold
8 03/05/08 On-going
9 03/05/08 On-going
10 03/05/08 04/03/08 Done 22
-------
67

Detroit David




"Gaurav" wrote:

=IF(C1="done",NETWORKDAYS(A1,B1)+SUM(D2:D10),SUM(D 2:D10))

The ranges are hypothetical...you can change as per your need.

Thanks
"Detroit David" <Detroit wrote in
message
...
How can a use a function within a function:

The spread sheet has three columns for this example:
A - Start Date
B - End Date
C - Status

For those rows that match the status criteria "Done" I wish to
calculate
the
number of networkdays between the Start and End dates and add it to a
total.

I have tried "SUMIF" but "Sum_range" does not seem to accept the
calculation.

Thank you in advance for your help.