Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default getting an average of No of Days on board verses month departed.

Trying to figure out how to automatically avearge the number of days by the
month they dparted. I could manually do this each month by using the avearge
function for instance =AVERAGE(H849:H880) but how can I set up a formula to
avearge the total days based on the yyyymm of the detach date. Any help would
be great.
F G H
Report date Detach date Total days
878 29-Aug-06 26-Sep-06 27
879 22-Aug-06 27-Sep-06 35
880 12-Sep-06 29-Sep-06 17
881 6-Sep-06 2-Oct-06 26
882 6-Sep-06 2-Oct-06 26
883 8-Aug-06 3-Oct-06 55
884 6-Sep-06 3-Oct-06 27

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default getting an average of No of Days on board verses month departed.

Assuming everyone in G849 to G880 has a detach date:
= (sum(G849:G880)-sum(H849:H880))/rows(G849:G880)

Format the cell with the formula as General (it might default to looking
like a weird date).

--
Regards,
Tom Ogilvy



"FCC(SW)JP USN" wrote:

Trying to figure out how to automatically avearge the number of days by the
month they dparted. I could manually do this each month by using the avearge
function for instance =AVERAGE(H849:H880) but how can I set up a formula to
avearge the total days based on the yyyymm of the detach date. Any help would
be great.
F G H
Report date Detach date Total days
878 29-Aug-06 26-Sep-06 27
879 22-Aug-06 27-Sep-06 35
880 12-Sep-06 29-Sep-06 17
881 6-Sep-06 2-Oct-06 26
882 6-Sep-06 2-Oct-06 26
883 8-Aug-06 3-Oct-06 55
884 6-Sep-06 3-Oct-06 27

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default getting an average of No of Days on board verses month departe

Hey Tom appreciate the quick response. Everyone in G from G2 through G1000
have a detach date. The detach dates go from 2003-present. On a summry sheet
I have to display the average days onboard by month and year. Column H has
the number of days the individual was here, my end result needs to be
something along the lines of average H2:H1000 if G2:G1000,"yyyymm"=200610 but
I don't quite no how to make it work. I have read many articles, and tried
various Ideas utilizing SUMPRODUCT and Average if, but am not having any
luck.

JP

"Tom Ogilvy" wrote:

Assuming everyone in G849 to G880 has a detach date:
= (sum(G849:G880)-sum(H849:H880))/rows(G849:G880)

Format the cell with the formula as General (it might default to looking
like a weird date).

--
Regards,
Tom Ogilvy



"FCC(SW)JP USN" wrote:

Trying to figure out how to automatically avearge the number of days by the
month they dparted. I could manually do this each month by using the avearge
function for instance =AVERAGE(H849:H880) but how can I set up a formula to
avearge the total days based on the yyyymm of the detach date. Any help would
be great.
F G H
Report date Detach date Total days
878 29-Aug-06 26-Sep-06 27
879 22-Aug-06 27-Sep-06 35
880 12-Sep-06 29-Sep-06 17
881 6-Sep-06 2-Oct-06 26
882 6-Sep-06 2-Oct-06 26
883 8-Aug-06 3-Oct-06 55
884 6-Sep-06 3-Oct-06 27

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default getting an average of No of Days on board verses month departe

=sumproduct(--(Month($G$2:$G$1000)=10),--(Year($G$2:$G$1000)=2006),($G$2:$G$1000-$F$2:$F$1000))/sumproduct(--(Month($G$2:$G$1000)=10),--(Year($G$2:$G$1000)=2006))


You can replace the 10 and 2006 with references to cells that contain 10 and
2006 (or other month year combination).

--
Regards,
Tom Ogilvy




"FCC(SW)JP USN" wrote in message
...
Hey Tom appreciate the quick response. Everyone in G from G2 through G1000
have a detach date. The detach dates go from 2003-present. On a summry
sheet
I have to display the average days onboard by month and year. Column H has
the number of days the individual was here, my end result needs to be
something along the lines of average H2:H1000 if G2:G1000,"yyyymm"=200610
but
I don't quite no how to make it work. I have read many articles, and tried
various Ideas utilizing SUMPRODUCT and Average if, but am not having any
luck.

JP

"Tom Ogilvy" wrote:

Assuming everyone in G849 to G880 has a detach date:
= (sum(G849:G880)-sum(H849:H880))/rows(G849:G880)

Format the cell with the formula as General (it might default to looking
like a weird date).

--
Regards,
Tom Ogilvy



"FCC(SW)JP USN" wrote:

Trying to figure out how to automatically avearge the number of days by
the
month they dparted. I could manually do this each month by using the
avearge
function for instance =AVERAGE(H849:H880) but how can I set up a
formula to
avearge the total days based on the yyyymm of the detach date. Any help
would
be great.
F G H
Report date Detach date Total days
878 29-Aug-06 26-Sep-06 27
879 22-Aug-06 27-Sep-06 35
880 12-Sep-06 29-Sep-06 17
881 6-Sep-06 2-Oct-06 26
882 6-Sep-06 2-Oct-06 26
883 8-Aug-06 3-Oct-06 55
884 6-Sep-06 3-Oct-06 27



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default getting an average of No of Days on board verses month departe

Tom,
That worked great and will save time in the future once I get it all set up.
I have one more question there is a slight difference, and I mean very slight
between that formula and what average does when just dealing with those
cells. The formula you gave me comes up with an answer of 43.88, and just
averaging the cells in H using average it comes up with 43.24. No worries but
was just wondering. The numbers I averaged for the Oct 2006 a
26.00
26.00
55.00
27.00
49.00
54.00
23.00
37.00
37.00
30.00
54.00
75.00
62.00
22.00
36.00
75.00
47.00


Again thanks for your time. Much appreciated.

JP

"Tom Ogilvy" wrote:

=sumproduct(--(Month($G$2:$G$1000)=10),--(Year($G$2:$G$1000)=2006),($G$2:$G$1000-$F$2:$F$1000))/sumproduct(--(Month($G$2:$G$1000)=10),--(Year($G$2:$G$1000)=2006))


You can replace the 10 and 2006 with references to cells that contain 10 and
2006 (or other month year combination).

--
Regards,
Tom Ogilvy




"FCC(SW)JP USN" wrote in message
...
Hey Tom appreciate the quick response. Everyone in G from G2 through G1000
have a detach date. The detach dates go from 2003-present. On a summry
sheet
I have to display the average days onboard by month and year. Column H has
the number of days the individual was here, my end result needs to be
something along the lines of average H2:H1000 if G2:G1000,"yyyymm"=200610
but
I don't quite no how to make it work. I have read many articles, and tried
various Ideas utilizing SUMPRODUCT and Average if, but am not having any
luck.

JP

"Tom Ogilvy" wrote:

Assuming everyone in G849 to G880 has a detach date:
= (sum(G849:G880)-sum(H849:H880))/rows(G849:G880)

Format the cell with the formula as General (it might default to looking
like a weird date).

--
Regards,
Tom Ogilvy



"FCC(SW)JP USN" wrote:

Trying to figure out how to automatically avearge the number of days by
the
month they dparted. I could manually do this each month by using the
avearge
function for instance =AVERAGE(H849:H880) but how can I set up a
formula to
avearge the total days based on the yyyymm of the detach date. Any help
would
be great.
F G H
Report date Detach date Total days
878 29-Aug-06 26-Sep-06 27
879 22-Aug-06 27-Sep-06 35
880 12-Sep-06 29-Sep-06 17
881 6-Sep-06 2-Oct-06 26
882 6-Sep-06 2-Oct-06 26
883 8-Aug-06 3-Oct-06 55
884 6-Sep-06 3-Oct-06 27






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default getting an average of No of Days on board verses month departe

I set up a table with your numbers and some additional dates in 2006 and
2005. My formula gave me 43.24

I suspect it is picking up an additional row or more somewhere in your data.

It should get exactly the same answer as you would get averaging the
differences.

Only way I could trouble shoot it is having your data. If you want me to
look
send a sample worksheet/workbook to



--
Regards,
Tom Ogilvy



"FCC(SW)JP USN" wrote in message
...
Tom,
That worked great and will save time in the future once I get it all set
up.
I have one more question there is a slight difference, and I mean very
slight
between that formula and what average does when just dealing with those
cells. The formula you gave me comes up with an answer of 43.88, and just
averaging the cells in H using average it comes up with 43.24. No worries
but
was just wondering. The numbers I averaged for the Oct 2006 a
26.00
26.00
55.00
27.00
49.00
54.00
23.00
37.00
37.00
30.00
54.00
75.00
62.00
22.00
36.00
75.00
47.00


Again thanks for your time. Much appreciated.

JP

"Tom Ogilvy" wrote:

=sumproduct(--(Month($G$2:$G$1000)=10),--(Year($G$2:$G$1000)=2006),($G$2:$G$1000-$F$2:$F$1000))/sumproduct(--(Month($G$2:$G$1000)=10),--(Year($G$2:$G$1000)=2006))


You can replace the 10 and 2006 with references to cells that contain 10
and
2006 (or other month year combination).

--
Regards,
Tom Ogilvy




"FCC(SW)JP USN" wrote in message
...
Hey Tom appreciate the quick response. Everyone in G from G2 through
G1000
have a detach date. The detach dates go from 2003-present. On a summry
sheet
I have to display the average days onboard by month and year. Column H
has
the number of days the individual was here, my end result needs to be
something along the lines of average H2:H1000 if
G2:G1000,"yyyymm"=200610
but
I don't quite no how to make it work. I have read many articles, and
tried
various Ideas utilizing SUMPRODUCT and Average if, but am not having
any
luck.

JP

"Tom Ogilvy" wrote:

Assuming everyone in G849 to G880 has a detach date:
= (sum(G849:G880)-sum(H849:H880))/rows(G849:G880)

Format the cell with the formula as General (it might default to
looking
like a weird date).

--
Regards,
Tom Ogilvy



"FCC(SW)JP USN" wrote:

Trying to figure out how to automatically avearge the number of days
by
the
month they dparted. I could manually do this each month by using the
avearge
function for instance =AVERAGE(H849:H880) but how can I set up a
formula to
avearge the total days based on the yyyymm of the detach date. Any
help
would
be great.
F G H
Report date Detach date Total days
878 29-Aug-06 26-Sep-06 27
879 22-Aug-06 27-Sep-06 35
880 12-Sep-06 29-Sep-06 17
881 6-Sep-06 2-Oct-06 26
882 6-Sep-06 2-Oct-06 26
883 8-Aug-06 3-Oct-06 55
884 6-Sep-06 3-Oct-06 27






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
excel to make the days cary over month to month automaticly GARY New Users to Excel 1 April 19th 08 06:05 PM
Number of days in month counted from shortened name of month & yea Tumar Excel Worksheet Functions 6 September 18th 07 03:36 PM
Days per month for calculating storage days Bart Excel Worksheet Functions 3 January 31st 07 06:40 PM
function to fill all days of month to end of month Monique Excel Worksheet Functions 11 May 1st 06 07:39 PM
formula for days in month - days left??? Jason[_18_] Excel Programming 3 August 23rd 03 09:58 PM


All times are GMT +1. The time now is 04:13 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"