Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Need to average with conditions attached

Hi

I have a shed load of data on spreadsheest to analyse

They are laid out as follows

Coumn A is a list of locations . There are 84 locations but 1500
entries.
Coulmn B is a a list of numbers relating to the location next to it in
column A.

I need to average all the numbers in column b where colum A meets a
certain criteria.

Sample data

London 12
Glasgow 13
London 11
London14
Newcastle 13
Glasgow 12

And so on


How do I do this in excel 2003. I know in Excel 2007 we have AVERAGEIF
but not in excel 2003

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 638
Default Need to average with conditions attached

Ctrl+Shift+Enter
=AVERAGE(IF(A2:A7="London",B2:B7))

flumpuk wrote:
Hi

I have a shed load of data on spreadsheest to analyse

They are laid out as follows

Coumn A is a list of locations . There are 84 locations but 1500
entries.
Coulmn B is a a list of numbers relating to the location next to it in
column A.

I need to average all the numbers in column b where colum A meets a
certain criteria.

Sample data

London 12
Glasgow 13
London 11
London14
Newcastle 13
Glasgow 12

And so on


How do I do this in excel 2003. I know in Excel 2007 we have AVERAGEIF
but not in excel 2003


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Need to average with conditions attached

You could also use the following functions to calculate your average:

=SUMIF(A1:A7,"=London",B1:B7)/COUNTIF(A1:A7,"=London")

However, the array formula in JW's prior post is by far the more elegant of
the two.

If you use the above formula, just click on TOOLS/ADD INS and verify that
the Analysis Toolpack has been checked on.
--
Kevin Backmann


"JW" wrote:

Ctrl+Shift+Enter
=AVERAGE(IF(A2:A7="London",B2:B7))

flumpuk wrote:
Hi

I have a shed load of data on spreadsheest to analyse

They are laid out as follows

Coumn A is a list of locations . There are 84 locations but 1500
entries.
Coulmn B is a a list of numbers relating to the location next to it in
column A.

I need to average all the numbers in column b where colum A meets a
certain criteria.

Sample data

London 12
Glasgow 13
London 11
London14
Newcastle 13
Glasgow 12

And so on


How do I do this in excel 2003. I know in Excel 2007 we have AVERAGEIF
but not in excel 2003



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Need to average with conditions attached

The analysis toolpak isn't required for =sumif() or =countif().

Kevin B wrote:

You could also use the following functions to calculate your average:

=SUMIF(A1:A7,"=London",B1:B7)/COUNTIF(A1:A7,"=London")

However, the array formula in JW's prior post is by far the more elegant of
the two.

If you use the above formula, just click on TOOLS/ADD INS and verify that
the Analysis Toolpack has been checked on.
--
Kevin Backmann

"JW" wrote:

Ctrl+Shift+Enter
=AVERAGE(IF(A2:A7="London",B2:B7))

flumpuk wrote:
Hi

I have a shed load of data on spreadsheest to analyse

They are laid out as follows

Coumn A is a list of locations . There are 84 locations but 1500
entries.
Coulmn B is a a list of numbers relating to the location next to it in
column A.

I need to average all the numbers in column b where colum A meets a
certain criteria.

Sample data

London 12
Glasgow 13
London 11
London14
Newcastle 13
Glasgow 12

And so on


How do I do this in excel 2003. I know in Excel 2007 we have AVERAGEIF
but not in excel 2003




--

Dave Peterson
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
Calculating an average with conditions. Rebekah Excel Discussion (Misc queries) 3 September 14th 07 02:31 PM
Average with multiple conditions Dez Excel Worksheet Functions 4 July 11th 07 06:07 PM
AVERAGE with conditions mr_concrete Excel Worksheet Functions 3 February 7th 07 08:23 PM
Using AVERAGE with conditions in different worksheets? mommy2kh Excel Worksheet Functions 1 July 16th 06 11:16 PM
average on 2 conditions Ted Metro Excel Worksheet Functions 6 January 7th 05 08:23 PM


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