Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default caluculate an average based on 2 criteria

I need to caluculate an average based on 2 criteria. Using the example
below, if A="brian" (F1) and D=not blank, then average all numbers in D
that have F1 ("brian") in column A. So in the example below, it would
average D1 & D4 (not include D2).

HELP anyone! Thanks.

Database (Sheet1)
A B C D*
1 brian 08/01/05 09/01/05 30
2 chris 08/15/05 09/01/05 15
3 pam
4 brian 08/15/05 09/01/05 15
5 brian 08/31/05

*-Formula to calculate days =IF(M20,(DAYS360(G2,M2))," ")

Totals/Formula (Sheet2)
F G
1 brian NEW FORMULA WILL GO HERE
2 chris
3 pam

  #2   Report Post  
pameluh
 
Posts: n/a
Default caluculate an average based on 2 criteria

Wouldn't it need to average D5 also?

I would suggest a lookup formula.

" wrote:

I need to caluculate an average based on 2 criteria. Using the example
below, if A="brian" (F1) and D=not blank, then average all numbers in D
that have F1 ("brian") in column A. So in the example below, it would
average D1 & D4 (not include D2).

HELP anyone! Thanks.

Database (Sheet1)
A B C D*
1 brian 08/01/05 09/01/05 30
2 chris 08/15/05 09/01/05 15
3 pam
4 brian 08/15/05 09/01/05 15
5 brian 08/31/05

*-Formula to calculate days =IF(M20,(DAYS360(G2,M2))," ")

Totals/Formula (Sheet2)
F G
1 brian NEW FORMULA WILL GO HERE
2 chris
3 pam


  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default caluculate an average based on 2 criteria

=AVERAGE(IF((A1:A5=F1)*(D1:D5<""),D1:D5))

entered with ctrl + shift & enter

--
Regards,

Peo Sjoblom

(No private emails please)


wrote in message
ups.com...
I need to caluculate an average based on 2 criteria. Using the example
below, if A="brian" (F1) and D=not blank, then average all numbers in D
that have F1 ("brian") in column A. So in the example below, it would
average D1 & D4 (not include D2).

HELP anyone! Thanks.

Database (Sheet1)
A B C D*
1 brian 08/01/05 09/01/05 30
2 chris 08/15/05 09/01/05 15
3 pam
4 brian 08/15/05 09/01/05 15
5 brian 08/31/05

*-Formula to calculate days =IF(M20,(DAYS360(G2,M2))," ")

Totals/Formula (Sheet2)
F G
1 brian NEW FORMULA WILL GO HERE
2 chris
3 pam


  #4   Report Post  
Biff
 
Posts: n/a
Default caluculate an average based on 2 criteria

Hi!

Try this entered as an array using the key combo of CTRL,SHIFT,ENTER:

=IF(SUMIF(Sheet1!A$1:A$5,F1,Sheet1!D$1:D$5),AVERAG E(IF(Sheet1!A$1:A$5=F1,IF(Sheet1!D$1:D$5<"",Sheet 1!D$1:D$5))),0)

Copy down as needed.

Biff

wrote in message
ups.com...
I need to caluculate an average based on 2 criteria. Using the example
below, if A="brian" (F1) and D=not blank, then average all numbers in D
that have F1 ("brian") in column A. So in the example below, it would
average D1 & D4 (not include D2).

HELP anyone! Thanks.

Database (Sheet1)
A B C D*
1 brian 08/01/05 09/01/05 30
2 chris 08/15/05 09/01/05 15
3 pam
4 brian 08/15/05 09/01/05 15
5 brian 08/31/05

*-Formula to calculate days =IF(M20,(DAYS360(G2,M2))," ")

Totals/Formula (Sheet2)
F G
1 brian NEW FORMULA WILL GO HERE
2 chris
3 pam



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
Returning Results Based on Two Criteria [email protected] Excel Worksheet Functions 7 October 23rd 05 02:53 PM
Average based on Hour Mike Punko Excel Worksheet Functions 7 September 15th 05 09:14 PM
Average of numbers within a range meeting certain criteria opal23k Excel Worksheet Functions 4 August 25th 05 08:51 PM
average based on weekday Nick Excel Worksheet Functions 9 July 27th 05 03:47 AM
Average Formula with Criteria PW11111 Excel Discussion (Misc queries) 1 June 10th 05 02:22 PM


All times are GMT +1. The time now is 10:32 AM.

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"