Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Sum the difference between dates given a certain criteria

I have a workbook with several worksheets (tabs)

The first and main worksheet has eight (8) columns with N rows.

I wish to calculate the number of days between two date values and sum the
results for rows that meet a certain criteria.

Lets use a simple example (so I can understand)

Three columns as follows:

A. Start Date
B. Due Date
C. Criteria

If the word in column C is €śDone€ť than calculate the number of days between
A & B and add it to a sum.

A B C
Start Date Due Date Status
01/01/08 01/31/08 Done
02/01/08 04/15/08 Done
03/01/08 05/10/08 Open
04/01/08 06/15/08 Open
05/02/08 06/15/08 Done

Thank you in advance for your help.

Detroit David

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sum the difference between dates given a certain criteria

Try this:

=SUMPRODUCT(--(C2:C6="done"),B2:B6-A2:A6)

--
Biff
Microsoft Excel MVP


"Detroit David" wrote in message
...
I have a workbook with several worksheets (tabs)

The first and main worksheet has eight (8) columns with N rows.

I wish to calculate the number of days between two date values and sum the
results for rows that meet a certain criteria.

Lets use a simple example (so I can understand)

Three columns as follows:

A. Start Date
B. Due Date
C. Criteria

If the word in column C is "Done" than calculate the number of days
between
A & B and add it to a sum.

A B C
Start Date Due Date Status
01/01/08 01/31/08 Done
02/01/08 04/15/08 Done
03/01/08 05/10/08 Open
04/01/08 06/15/08 Open
05/02/08 06/15/08 Done

Thank you in advance for your help.

Detroit David



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Sum the difference between dates given a certain criteria

Thank you for the prompt and accurate reply it worked perfectly.... however I
forgot one element which I have not been able to get to work.

I wish to calculate using "NETWORKDAYS" I have tried everyway I can think of
to get the formula to work with "NETWORKDAYS" but I haven't found the
solution.

Could you please tell me how to use NETWORKDAYS in this type of calculation.

Thank you


"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(C2:C6="done"),B2:B6-A2:A6)

--
Biff
Microsoft Excel MVP


"Detroit David" wrote in message
...
I have a workbook with several worksheets (tabs)

The first and main worksheet has eight (8) columns with N rows.

I wish to calculate the number of days between two date values and sum the
results for rows that meet a certain criteria.

Lets use a simple example (so I can understand)

Three columns as follows:

A. Start Date
B. Due Date
C. Criteria

If the word in column C is "Done" than calculate the number of days
between
A & B and add it to a sum.

A B C
Start Date Due Date Status
01/01/08 01/31/08 Done
02/01/08 04/15/08 Done
03/01/08 05/10/08 Open
04/01/08 06/15/08 Open
05/02/08 06/15/08 Done

Thank you in advance for your help.

Detroit David




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sum the difference between dates given a certain criteria

NETWORKDAYS won't work with arrays so you'd have to do something like this:

=IF(C2="done",NETWORKDAYS(A2,B2,holidays),"")

Copy down as needed.

Then use a SUM formula on that column.

--
Biff
Microsoft Excel MVP


"Detroit David" wrote in message
...
Thank you for the prompt and accurate reply it worked perfectly....
however I
forgot one element which I have not been able to get to work.

I wish to calculate using "NETWORKDAYS" I have tried everyway I can think
of
to get the formula to work with "NETWORKDAYS" but I haven't found the
solution.

Could you please tell me how to use NETWORKDAYS in this type of
calculation.

Thank you


"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(C2:C6="done"),B2:B6-A2:A6)

--
Biff
Microsoft Excel MVP


"Detroit David" wrote in message
...
I have a workbook with several worksheets (tabs)

The first and main worksheet has eight (8) columns with N rows.

I wish to calculate the number of days between two date values and sum
the
results for rows that meet a certain criteria.

Lets use a simple example (so I can understand)

Three columns as follows:

A. Start Date
B. Due Date
C. Criteria

If the word in column C is "Done" than calculate the number of days
between
A & B and add it to a sum.

A B C
Start Date Due Date Status
01/01/08 01/31/08 Done
02/01/08 04/15/08 Done
03/01/08 05/10/08 Open
04/01/08 06/15/08 Open
05/02/08 06/15/08 Done

Thank you in advance for your help.

Detroit David






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Sum the difference between dates given a certain criteria

Thank you for your help.



"T. Valko" wrote:

NETWORKDAYS won't work with arrays so you'd have to do something like this:

=IF(C2="done",NETWORKDAYS(A2,B2,holidays),"")

Copy down as needed.

Then use a SUM formula on that column.

--
Biff
Microsoft Excel MVP


"Detroit David" wrote in message
...
Thank you for the prompt and accurate reply it worked perfectly....
however I
forgot one element which I have not been able to get to work.

I wish to calculate using "NETWORKDAYS" I have tried everyway I can think
of
to get the formula to work with "NETWORKDAYS" but I haven't found the
solution.

Could you please tell me how to use NETWORKDAYS in this type of
calculation.

Thank you


"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(C2:C6="done"),B2:B6-A2:A6)

--
Biff
Microsoft Excel MVP


"Detroit David" wrote in message
...
I have a workbook with several worksheets (tabs)

The first and main worksheet has eight (8) columns with N rows.

I wish to calculate the number of days between two date values and sum
the
results for rows that meet a certain criteria.

Lets use a simple example (so I can understand)

Three columns as follows:

A. Start Date
B. Due Date
C. Criteria

If the word in column C is "Done" than calculate the number of days
between
A & B and add it to a sum.

A B C
Start Date Due Date Status
01/01/08 01/31/08 Done
02/01/08 04/15/08 Done
03/01/08 05/10/08 Open
04/01/08 06/15/08 Open
05/02/08 06/15/08 Done

Thank you in advance for your help.

Detroit David









  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sum the difference between dates given a certain criteria

You're welcome!

--
Biff
Microsoft Excel MVP


"Detroit David" wrote in message
...
Thank you for your help.



"T. Valko" wrote:

NETWORKDAYS won't work with arrays so you'd have to do something like
this:

=IF(C2="done",NETWORKDAYS(A2,B2,holidays),"")

Copy down as needed.

Then use a SUM formula on that column.

--
Biff
Microsoft Excel MVP


"Detroit David" wrote in message
...
Thank you for the prompt and accurate reply it worked perfectly....
however I
forgot one element which I have not been able to get to work.

I wish to calculate using "NETWORKDAYS" I have tried everyway I can
think
of
to get the formula to work with "NETWORKDAYS" but I haven't found the
solution.

Could you please tell me how to use NETWORKDAYS in this type of
calculation.

Thank you


"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(C2:C6="done"),B2:B6-A2:A6)

--
Biff
Microsoft Excel MVP


"Detroit David" wrote in
message
...
I have a workbook with several worksheets (tabs)

The first and main worksheet has eight (8) columns with N rows.

I wish to calculate the number of days between two date values and
sum
the
results for rows that meet a certain criteria.

Lets use a simple example (so I can understand)

Three columns as follows:

A. Start Date
B. Due Date
C. Criteria

If the word in column C is "Done" than calculate the number of days
between
A & B and add it to a sum.

A B C
Start Date Due Date Status
01/01/08 01/31/08 Done
02/01/08 04/15/08 Done
03/01/08 05/10/08 Open
04/01/08 06/15/08 Open
05/02/08 06/15/08 Done

Thank you in advance for your help.

Detroit David









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference of two dates Zafar Excel Worksheet Functions 3 July 26th 07 08:44 AM
Difference of two dates sajan chauhan Excel Discussion (Misc queries) 3 June 5th 07 04:47 AM
difference between dates Ankur Excel Discussion (Misc queries) 2 August 6th 06 05:16 PM
difference between dates Clash Excel Discussion (Misc queries) 4 May 26th 06 08:02 AM
difference between two dates dhouston1000 Excel Discussion (Misc queries) 2 August 24th 05 11:19 AM


All times are GMT +1. The time now is 07:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"