#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Conditional Average

can anybody please help me out?
I have a worksheet with below mentioned details:

State Qty
A 50
A 60
A
B 70
B 65

Now i need average of every state.
Please help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Conditional Average

Try,


=SUMIF(A2:A6,"=A",B2:B6)/COUNTIF(A2:A6,"=A")

Change the A to the state you want.

Mike

"Excel_Learner" wrote:

can anybody please help me out?
I have a worksheet with below mentioned details:

State Qty
A 50
A 60
A
B 70
B 65

Now i need average of every state.
Please help.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Conditional Average

DataSubtotals, in Use Function choose Average

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Excel_Learner" wrote in message
...
| can anybody please help me out?
| I have a worksheet with below mentioned details:
|
| State Qty
| A 50
| A 60
| A
| B 70
| B 65
|
| Now i need average of every state.
| Please help.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Conditional Average

Thaks for your quick reply Mike. But the result will be 110/3. while result
shuld be 110/2 since a cell is blank.

"Mike H" wrote:

Try,


=SUMIF(A2:A6,"=A",B2:B6)/COUNTIF(A2:A6,"=A")

Change the A to the state you want.

Mike

"Excel_Learner" wrote:

can anybody please help me out?
I have a worksheet with below mentioned details:

State Qty
A 50
A 60
A
B 70
B 65

Now i need average of every state.
Please help.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Conditional Average

ok,

=SUMIF(A2:A6,"=A",B2:B6)/SUMPRODUCT((A2:A6="A")*(B2:B60))

mIKE

"Excel_Learner" wrote:

Thaks for your quick reply Mike. But the result will be 110/3. while result
shuld be 110/2 since a cell is blank.

"Mike H" wrote:

Try,


=SUMIF(A2:A6,"=A",B2:B6)/COUNTIF(A2:A6,"=A")

Change the A to the state you want.

Mike

"Excel_Learner" wrote:

can anybody please help me out?
I have a worksheet with below mentioned details:

State Qty
A 50
A 60
A
B 70
B 65

Now i need average of every state.
Please help.



  #6   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Conditional Average

Then you probably need a conditional average:

Try this, array-entered* in say, C2:
=AVERAGE(IF((A2:A6="A")*(B2:B6<""),B2:B6))

*Press CTRL+SHIFT+ENTER to enter the formula, instead of just pressing ENTER
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Excel_Learner" wrote:
Thaks for your quick reply Mike. But the result will be 110/3. while result
shuld be 110/2 since a cell is blank.


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Conditional Average


"Max" wrote in message
...
Then you probably need a conditional average:


You mean, as he stated in the subject? <vbg


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Conditional Average

Thank you all for your precious time. Mike's trick did my work. Thank to Mike
again.

"Mike H" wrote:

ok,

=SUMIF(A2:A6,"=A",B2:B6)/SUMPRODUCT((A2:A6="A")*(B2:B60))

mIKE

"Excel_Learner" wrote:

Thaks for your quick reply Mike. But the result will be 110/3. while result
shuld be 110/2 since a cell is blank.

"Mike H" wrote:

Try,


=SUMIF(A2:A6,"=A",B2:B6)/COUNTIF(A2:A6,"=A")

Change the A to the state you want.

Mike

"Excel_Learner" wrote:

can anybody please help me out?
I have a worksheet with below mentioned details:

State Qty
A 50
A 60
A
B 70
B 65

Now i need average of every state.
Please help.

  #9   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Conditional Average

Then you probably need a conditional average:
You mean, as he stated in the subject? <vbg


Aha <g, think I missed out in the earlier descript: "additional condition"
Then you probably need an additional condition in the conditional average

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


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
Conditional Average Fupp83 Excel Worksheet Functions 1 June 6th 07 10:08 PM
Conditional Average [email protected] Excel Worksheet Functions 4 April 3rd 07 11:53 PM
Conditional Average Jason Excel Worksheet Functions 5 August 3rd 06 01:51 PM
Conditional Average MEK911 Excel Discussion (Misc queries) 4 September 9th 05 05:45 PM
Conditional Average MEK911 Excel Worksheet Functions 4 September 9th 05 05:23 PM


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