Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 71
Default Average IF with calculation

I have this problem:

IF O1 = "yes" then j1-p1+m1
but I need to do this from row1:row120 and then get the averages of
row1:row120

Can anyone help me please?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7,247
Default Average IF with calculation

You can use an array formula to do this. Enter the following formula:

=AVERAGE(IF(O1:O20="yes",J1:J20-P1:P20+M1:M20,FALSE))

Since this is an array formula, you must press CTRL SHIFT ENTER rather than
just ENTER when you first enter the formula and whenever you edit it later.
If you do this properly, Excel will display the formula in the formula bar
enclosed in curly braces { }. See www.cpearson.com/Excel/ArrayFormulas.aspx
for much more info about array formulas.


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2008
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


"Chris" wrote in message
...
I have this problem:

IF O1 = "yes" then j1-p1+m1
but I need to do this from row1:row120 and then get the averages of
row1:row120

Can anyone help me please?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,091
Default Average IF with calculation

You stated half. If O1 = "yes" but what if it doesn't?

Tyro


"Chris" wrote in message
...
I have this problem:

IF O1 = "yes" then j1-p1+m1
but I need to do this from row1:row120 and then get the averages of
row1:row120

Can anyone help me please?



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
use sub-totals and average in same calculation Sherry L Excel Worksheet Functions 0 January 26th 08 06:56 PM
Difficult Average Calculation <HELP jk Excel Worksheet Functions 4 July 6th 06 06:32 PM
Calculation help from average total Middlemix Excel Worksheet Functions 1 February 16th 06 01:26 PM
average calculation blackstar Excel Discussion (Misc queries) 1 February 4th 06 07:46 PM
Average Calculation smallcap Excel Worksheet Functions 6 October 28th 05 12:36 AM


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