Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Formula to figure an average on a range of cells with an "if" form

I have a spreadsheet that has a formula in column g that is an "if" formula
for the data in column f. I need to get an average of the data in column
"g". For example

column f column g
yellow 2
green 3
red 1
red 1
red 1
average yellow need formula for this

help!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 42
Default Formula to figure an average on a range of cells with an "if" form

Do you mean like average()?

=Average(G1:G5)

Hope this helps, Jim
--
I appreciate any feedback.


"lucyo912" wrote:

I have a spreadsheet that has a formula in column g that is an "if" formula
for the data in column f. I need to get an average of the data in column
"g". For example

column f column g
yellow 2
green 3
red 1
red 1
red 1
average yellow need formula for this

help!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Formula to figure an average on a range of cells with an "if" form

Hi,

Try this

=AVERAGE(IF(F1:F20="Yellow",G1:G20,FALSE))

This is an ARRAY formula so commit the formula by pressing Ctrl+Shift+Enter
NOT just Enter. If you do it correctly Excel will put curly brackets around
it {}. You can't type these yourself.

Mike


"lucyo912" wrote:

I have a spreadsheet that has a formula in column g that is an "if" formula
for the data in column f. I need to get an average of the data in column
"g". For example

column f column g
yellow 2
green 3
red 1
red 1
red 1
average yellow need formula for this

help!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default Formula to figure an average on a range of cells with an "if" form

On Tue, 5 Aug 2008 11:40:00 -0700, lucyo912
wrote:

I have a spreadsheet that has a formula in column g that is an "if" formula
for the data in column f. I need to get an average of the data in column
"g". For example

column f column g
yellow 2
green 3
red 1
red 1
red 1
average yellow need formula for this

help!


Try this formula in cell G6:

=AVERAGEIF(F1:F5, "=yellow", G1:G5)

Hope this helps / Lars-Åke
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Formula to figure an average on a range of cells with an "if"

Hi,

I guess that's an Excel 2007 enhancement?

Mike

"Lars-Ã…ke Aspelin" wrote:

On Tue, 5 Aug 2008 11:40:00 -0700, lucyo912
wrote:

I have a spreadsheet that has a formula in column g that is an "if" formula
for the data in column f. I need to get an average of the data in column
"g". For example

column f column g
yellow 2
green 3
red 1
red 1
red 1
average yellow need formula for this

help!


Try this formula in cell G6:

=AVERAGEIF(F1:F5, "=yellow", G1:G5)

Hope this helps / Lars-Ã…ke



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Formula to figure an average on a range of cells with an "if"

nope - no dice - get the #DIV/0! error

"Mike H" wrote:

Hi,

Try this

=AVERAGE(IF(F1:F20="Yellow",G1:G20,FALSE))

This is an ARRAY formula so commit the formula by pressing Ctrl+Shift+Enter
NOT just Enter. If you do it correctly Excel will put curly brackets around
it {}. You can't type these yourself.

Mike


"lucyo912" wrote:

I have a spreadsheet that has a formula in column g that is an "if" formula
for the data in column f. I need to get an average of the data in column
"g". For example

column f column g
yellow 2
green 3
red 1
red 1
red 1
average yellow need formula for this

help!

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Formula to figure an average on a range of cells with an "if"

No need for the FALSE part in the formula, regardless this will return a div
error if there are no yellow in F1:F20
so make sure you don't have extra spaces etc in F1:F20 where it looks like
you have yellow

--


Regards,


Peo Sjoblom

"lucyo912" wrote in message
...
nope - no dice - get the #DIV/0! error

"Mike H" wrote:

Hi,

Try this

=AVERAGE(IF(F1:F20="Yellow",G1:G20,FALSE))

This is an ARRAY formula so commit the formula by pressing
Ctrl+Shift+Enter
NOT just Enter. If you do it correctly Excel will put curly brackets
around
it {}. You can't type these yourself.

Mike


"lucyo912" wrote:

I have a spreadsheet that has a formula in column g that is an "if"
formula
for the data in column f. I need to get an average of the data in
column
"g". For example

column f column g
yellow 2
green 3
red 1
red 1
red 1
average yellow need formula for this

help!



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
any formula to convert numbers in word form, e.g. "2" as "Two"? Neeraj Excel Worksheet Functions 1 May 26th 08 01:03 PM
function to return day in the form "Monday", "Tuesday" etc given . MTro Excel Worksheet Functions 2 October 3rd 07 09:49 AM
Converting a text form of "=Sheet2!A1" into a reference formula Doug Davey Excel Discussion (Misc queries) 11 July 6th 07 03:51 PM
Array as a "named range" - formula ok in cells, but error as "named range" tskogstrom Excel Discussion (Misc queries) 11 December 28th 06 04:44 PM
Formula for % of "yes" in range of cells? npw Excel Worksheet Functions 1 April 25th 06 12:38 AM


All times are GMT +1. The time now is 06:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"