Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Formula to take average from column range matching another

I am trying to write a formula that returns a calculation, lets say an
average, of a range of numbers down a column that match up with a value in
another column. In the example below, I have multiple occurances of a
certain number study in a long list of studies that have values associated
with them in another column. If I run a pivot table to get one row per
study, can I write a formula (to the right, outside the pivot table) to go to
my data table and return the average for all Values in Study 1, 2 and so on?

Study Value
1 2
1 4
2 3
2 6

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Formula to take average from column range matching another

How about using the sumproduct formula to get the sum divided by the count
(you could also use SumIf and CountIf...

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
--
HTH...

Jim Thomlinson


"dmasch" wrote:

I am trying to write a formula that returns a calculation, lets say an
average, of a range of numbers down a column that match up with a value in
another column. In the example below, I have multiple occurances of a
certain number study in a long list of studies that have values associated
with them in another column. If I run a pivot table to get one row per
study, can I write a formula (to the right, outside the pivot table) to go to
my data table and return the average for all Values in Study 1, 2 and so on?

Study Value
1 2
1 4
2 3
2 6

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 380
Default Formula to take average from column range matching another

=AVERAGE(IF(A2:A20=1,B2:B20))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"dmasch" wrote in message
...
I am trying to write a formula that returns a calculation, lets say an
average, of a range of numbers down a column that match up with a value in
another column. In the example below, I have multiple occurances of a
certain number study in a long list of studies that have values associated
with them in another column. If I run a pivot table to get one row per
study, can I write a formula (to the right, outside the pivot table) to go

to
my data table and return the average for all Values in Study 1, 2 and so

on?

Study Value
1 2
1 4
2 3
2 6



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Formula to take average from column range matching another

Bob,

That worked perfectly. Thanks so much you don't even know how much time
this saves me.

Best regards,
Doug - "dmasch"

"Bob Phillips" wrote:

=AVERAGE(IF(A2:A20=1,B2:B20))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"dmasch" wrote in message
...
I am trying to write a formula that returns a calculation, lets say an
average, of a range of numbers down a column that match up with a value in
another column. In the example below, I have multiple occurances of a
certain number study in a long list of studies that have values associated
with them in another column. If I run a pivot table to get one row per
study, can I write a formula (to the right, outside the pivot table) to go

to
my data table and return the average for all Values in Study 1, 2 and so

on?

Study Value
1 2
1 4
2 3
2 6




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
Date formulas DRondeau Excel Discussion (Misc queries) 7 September 6th 06 09:53 PM
Lookup Data in two seperate Spreadsheets Padraig Excel Worksheet Functions 6 June 28th 06 03:05 PM
Need to average a range AND calc a formula at once... S Davis Excel Worksheet Functions 1 June 23rd 06 11:16 PM
formula to sort a range so that it matches the exact rows of a column that is outside that range? steveo Excel Discussion (Misc queries) 1 June 18th 06 02:05 AM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM


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