Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Blackstar79
 
Posts: n/a
Default omiting cells in average calcs

how do i calculate average of cells but only if certain cells say something.
ex:
average of cells A1,A11,A12,A14. average of those cells but for cell A14
only include it in the average calculation if cell A13 has "x". if "x" is not
present in cell A13 then only calculate the average of A1,A11,A12 & omit
results of cell A14.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default omiting cells in average calcs

Maybe just brute force would work ok:

=SUM(A1,A11:A12,IF(A13="x",A14))
/(COUNT(A1,A11:A12)+((A13="x")*ISNUMBER(A14)))

(one cell)



Blackstar79 wrote:

how do i calculate average of cells but only if certain cells say something.
ex:
average of cells A1,A11,A12,A14. average of those cells but for cell A14
only include it in the average calculation if cell A13 has "x". if "x" is not
present in cell A13 then only calculate the average of A1,A11,A12 & omit
results of cell A14.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default omiting cells in average calcs

Hi!

Try this:

=SUM(A1,A11:A12,IF(A13="x",A14,0))/(3+(A13="x"))

Strange thing about AVERAGE. It's supposed to ignore TEXT but fails when you
try something like this:

=AVERAGE(A1,A11,A12,IF(A13="x",A14,""))

Biff

"Blackstar79" wrote in message
...
how do i calculate average of cells but only if certain cells say
something.
ex:
average of cells A1,A11,A12,A14. average of those cells but for cell A14
only include it in the average calculation if cell A13 has "x". if "x" is
not
present in cell A13 then only calculate the average of A1,A11,A12 & omit
results of cell A14.



  #4   Report Post  
Posted to microsoft.public.excel.misc
Biff
 
Posts: n/a
Default omiting cells in average calcs

Strange thing about AVERAGE. It's supposed to ignore TEXT but fails when
you try something like this:
=AVERAGE(A1,A11,A12,IF(A13="x",A14,""))


Thanks to Harlan:

=AVERAGE(A1,A11,A12,IF(A13="x",A14,{""}))

Biff

"Biff" wrote in message
...
Hi!

Try this:

=SUM(A1,A11:A12,IF(A13="x",A14,0))/(3+(A13="x"))

Strange thing about AVERAGE. It's supposed to ignore TEXT but fails when
you try something like this:

=AVERAGE(A1,A11,A12,IF(A13="x",A14,""))

Biff

"Blackstar79" wrote in message
...
how do i calculate average of cells but only if certain cells say
something.
ex:
average of cells A1,A11,A12,A14. average of those cells but for cell A14
only include it in the average calculation if cell A13 has "x". if "x" is
not
present in cell A13 then only calculate the average of A1,A11,A12 & omit
results of cell A14.





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
Sumif Cells Are Not Blank Powlaz Excel Worksheet Functions 12 March 15th 06 04:40 PM
Average function with #VALUE! error in reference cells Larry4500 Excel Worksheet Functions 9 January 16th 06 09:44 AM
Limit or Exclude cells in Average and Sum formula dagger Excel Worksheet Functions 3 July 7th 05 03:52 PM
average cells omitting nulls average-gal Excel Worksheet Functions 1 March 10th 05 08:14 PM
How do i get an average that ignores blanks in the range of cells. ucastores Excel Worksheet Functions 7 November 11th 04 05:01 PM


All times are GMT +1. The time now is 08:47 PM.

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"