A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Average if using multiple criteria



 
 
Thread Tools Display Modes
  #1  
Old September 16th, 2004, 04:29 PM
Jeff
external usenet poster
 
Posts: n/a
Default Average if using multiple criteria

Hello all. I could use a little help. I've tried working
with average and an array formula and can work with one
criteria but I am having trouble adding a second.

My spreadsheet is set up as follows

column a: column b: column c:
customer a 1/15/04 25
customer b 1/26/04 41
customer a 1/30/04 32
customer c 2/01/04 51
customer a 2/10/04 14

How do I find the average of column c where column a
equals "customer a" and column b is between 1/01/04 and
1/31/04?

According to the above example it would average 25 and 32
but not the 14 since it is past 1/31/04.

Thank you in advance.
  #2  
Old September 16th, 2004, 04:45 PM
JulieD
external usenet poster
 
Posts: n/a
Default

Hi Jeff

there's probably other ways but here's two:

=SUMPRODUCT((A2:A6=C8)*(B2:B6=C9)*(B2:B6=C10)*C2 :C6)/SUMPRODUCT((A2:A6=C8)
*(B2:B6=C9)*(B2:B6=C10))

and

=SUMPRODUCT((A2:A6=C8)*(TEXT(B2:B6,"mmm")="Jan")*C 2:C6)/SUMPRODUCT((A2:A6=C8
)*(TEXT(B2:B6,"mmm")="Jan"))

where C8 contains "customer a"
and C9 contains the start date of your range
and C10 contains the end date of yor range

Cheers
JulieD

"Jeff" wrote in message
...
Hello all. I could use a little help. I've tried working
with average and an array formula and can work with one
criteria but I am having trouble adding a second.

My spreadsheet is set up as follows

column a: column b: column c:
customer a 1/15/04 25
customer b 1/26/04 41
customer a 1/30/04 32
customer c 2/01/04 51
customer a 2/10/04 14

How do I find the average of column c where column a
equals "customer a" and column b is between 1/01/04 and
1/31/04?

According to the above example it would average 25 and 32
but not the 14 since it is past 1/31/04.

Thank you in advance.



  #3  
Old September 16th, 2004, 06:04 PM
JulieD
external usenet poster
 
Posts: n/a
Default

Hi Frank

still can't get my head around array formulas , whereas the sumproduct
makes perfect sense to me vbg

cheers
JulieD

"Frank Kabel" wrote in message
...
Hi Julie
as alternative using the array formula:
=AVERAGE(IF(A2:A6=C8)*(B2:B6=C9)*(B2:B6=C10),C2: C6))

--
Regards
Frank Kabel
Frankfurt, Germany


JulieD wrote:
Hi Jeff

there's probably other ways but here's two:


=SUMPRODUCT((A2:A6=C8)*(B2:B6=C9)*(B2:B6=C10)*C2 :C6)/SUMPRODUCT((A2:A
6=C8)
*(B2:B6=C9)*(B2:B6=C10))

and


=SUMPRODUCT((A2:A6=C8)*(TEXT(B2:B6,"mmm")="Jan")*C 2:C6)/SUMPRODUCT((A2:
A6=C8
)*(TEXT(B2:B6,"mmm")="Jan"))

where C8 contains "customer a"
and C9 contains the start date of your range
and C10 contains the end date of yor range

Cheers
JulieD

"Jeff" wrote in message
...
Hello all. I could use a little help. I've tried working
with average and an array formula and can work with one
criteria but I am having trouble adding a second.

My spreadsheet is set up as follows

column a: column b: column c:
customer a 1/15/04 25
customer b 1/26/04 41
customer a 1/30/04 32
customer c 2/01/04 51
customer a 2/10/04 14

How do I find the average of column c where column a
equals "customer a" and column b is between 1/01/04 and
1/31/04?

According to the above example it would average 25 and 32
but not the 14 since it is past 1/31/04.

Thank you in advance.




  #4  
Old September 16th, 2004, 06:06 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default

Hi Julie
as alternative using the array formula:
=AVERAGE(IF(A2:A6=C8)*(B2:B6=C9)*(B2:B6=C10),C2: C6))

--
Regards
Frank Kabel
Frankfurt, Germany


JulieD wrote:
Hi Jeff

there's probably other ways but here's two:


=SUMPRODUCT((A2:A6=C8)*(B2:B6=C9)*(B2:B6=C10)*C2 :C6)/SUMPRODUCT((A2:A
6=C8)
*(B2:B6=C9)*(B2:B6=C10))

and


=SUMPRODUCT((A2:A6=C8)*(TEXT(B2:B6,"mmm")="Jan")*C 2:C6)/SUMPRODUCT((A2:
A6=C8
)*(TEXT(B2:B6,"mmm")="Jan"))

where C8 contains "customer a"
and C9 contains the start date of your range
and C10 contains the end date of yor range

Cheers
JulieD

"Jeff" wrote in message
...
Hello all. I could use a little help. I've tried working
with average and an array formula and can work with one
criteria but I am having trouble adding a second.

My spreadsheet is set up as follows

column a: column b: column c:
customer a 1/15/04 25
customer b 1/26/04 41
customer a 1/30/04 32
customer c 2/01/04 51
customer a 2/10/04 14

How do I find the average of column c where column a
equals "customer a" and column b is between 1/01/04 and
1/31/04?

According to the above example it would average 25 and 32
but not the 14 since it is past 1/31/04.

Thank you in advance.


  #5  
Old September 16th, 2004, 06:12 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default

Hi Julie
as long as it works who cares :-)
Maybe the SUMPRODUCT variant is even faster...

--
Regards
Frank Kabel
Frankfurt, Germany


JulieD wrote:
Hi Frank

still can't get my head around array formulas , whereas the
sumproduct makes perfect sense to me vbg

cheers
JulieD

"Frank Kabel" wrote in message
...
Hi Julie
as alternative using the array formula:
=AVERAGE(IF(A2:A6=C8)*(B2:B6=C9)*(B2:B6=C10),C2: C6))

--
Regards
Frank Kabel
Frankfurt, Germany


JulieD wrote:
Hi Jeff

there's probably other ways but here's two:



=SUMPRODUCT((A2:A6=C8)*(B2:B6=C9)*(B2:B6=C10)*C2 :C6)/SUMPRODUCT((A2:A
6=C8)
*(B2:B6=C9)*(B2:B6=C10))

and



=SUMPRODUCT((A2:A6=C8)*(TEXT(B2:B6,"mmm")="Jan")*C 2:C6)/SUMPRODUCT((A2:
A6=C8
)*(TEXT(B2:B6,"mmm")="Jan"))

where C8 contains "customer a"
and C9 contains the start date of your range
and C10 contains the end date of yor range

Cheers
JulieD

"Jeff" wrote in message
...
Hello all. I could use a little help. I've tried working
with average and an array formula and can work with one
criteria but I am having trouble adding a second.

My spreadsheet is set up as follows

column a: column b: column c:
customer a 1/15/04 25
customer b 1/26/04 41
customer a 1/30/04 32
customer c 2/01/04 51
customer a 2/10/04 14

How do I find the average of column c where column a
equals "customer a" and column b is between 1/01/04 and
1/31/04?

According to the above example it would average 25 and 32
but not the 14 since it is past 1/31/04.

Thank you in advance.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple criteria for countif() theillknight General Discussion 2 August 10th, 2004 11:38 PM
Countif functions with multiple criteria Jason Morin Worksheet Functions 3 April 5th, 2004 08:46 PM
Countif functions with multiple criteria t Worksheet Functions 0 April 5th, 2004 07:11 PM
Sumif over multiple pages with two criteria Worksheet Functions 0 March 17th, 2004 07:27 PM
DCOUNT & DSUM w/ multiple criteria Dianne Worksheet Functions 1 September 30th, 2003 04:35 PM


All times are GMT +1. The time now is 12:05 PM.


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