Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Trying To Average cells Need Help!!!

This is what i have & works well
{=IF(AR6="L",AVERAGE(IF(AT$6:AT$66=0,AT$6:AT$66)) ,"")}
Now what im trying to do is add AW6 IF name is entered
I tried these but not working
{=IF(AR6="L",IF(AW6"",AVERAGE(IF(AT$6:AT$66=0,AT $6:AT$66)),"")}
{=IF(AR6="L",OR(IF(AW6"",AVERAGE(IF(AT$6:AT$66=0 ,AT$6:AT$66)),"")}
I get a Name or False error( CAN SOMEONE PLEASE HELP)
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default Trying To Average cells Need Help!!!

On Sat, 30 Jan 2010 10:52:01 -0800, Mike
wrote:

This is what i have & works well
{=IF(AR6="L",AVERAGE(IF(AT$6:AT$66=0,AT$6:AT$66) ),"")}
Now what im trying to do is add AW6 IF name is entered
I tried these but not working
{=IF(AR6="L",IF(AW6"",AVERAGE(IF(AT$6:AT$66=0,A T$6:AT$66)),"")}
{=IF(AR6="L",OR(IF(AW6"",AVERAGE(IF(AT$6:AT$66= 0,AT$6:AT$66)),"")}
I get a Name or False error( CAN SOMEONE PLEASE HELP)



Try this array formula:

=IF(OR(AR6="L",AW6<""),AVERAGE(IF(AT$6:AT$66=0,A T$6:AT$66)),"")

Hope this helps / Lars-Åke


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 563
Default Trying To Average cells Need Help!!!

Your formula
{=IF(AR6="L",IF(AW6"",AVERAGE(IF(AT$6:AT$66=0,AT $6:AT$66)),"")}
should do the average when BOTH conditions are true AR6="L" and AW6<""
I put some numbers in A1:A7, "L" in C1 and "x" in D1
Then I used =IF(C1="L",IF(D1"",AVERAGE(IF(A1:A7=0,A1:A7)),"" ))
and it worked just fine

Normally to use two conditions in an IF we use the AND function:
=IF(AND(AR6="L",AW6<""), do_this, do_that)
Bet Boolean function (AND, OR . NOT) are not allowed in array functions
The alternative to AND is to multiply the two test, while the alternative to
OR is to add then
So this should work for you
{=IF((AR6="L")*(AW6"")),AVERAGE(IF(AT$6:AT$66=0, AT$6:AT$66)),"")}
if you want BOTH conditions to be true (AND)
or
{=IF((AR6="L")+(AW6"")),AVERAGE(IF(AT$6:AT$66=0, AT$6:AT$66)),"")}
if you want EITHER conditions to be true (OR)

When I look at your second formula, I wonder if you mean "do the average if
EITHER condition is true

best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Mike" wrote in message
...
This is what i have & works well
{=IF(AR6="L",AVERAGE(IF(AT$6:AT$66=0,AT$6:AT$66)) ,"")}
Now what im trying to do is add AW6 IF name is entered
I tried these but not working
{=IF(AR6="L",IF(AW6"",AVERAGE(IF(AT$6:AT$66=0,AT $6:AT$66)),"")}
{=IF(AR6="L",OR(IF(AW6"",AVERAGE(IF(AT$6:AT$66=0 ,AT$6:AT$66)),"")}
I get a Name or False error( CAN SOMEONE PLEASE HELP)


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 563
Default Trying To Average cells Need Help!!!

I erred: the non-use of AND/OF does not apply the in this case
{=IF(OR(AR6="L", AW6""),AVERAGE(IF(AT$6:AT$66=0,AT$6:AT$66)),"")}
is fine
You could not use AND/OR in the IF within the AVERAGE
Sorry!
Bernard

"Bernard Liengme" wrote in message
...
Your formula
{=IF(AR6="L",IF(AW6"",AVERAGE(IF(AT$6:AT$66=0,AT $6:AT$66)),"")}
should do the average when BOTH conditions are true AR6="L" and AW6<""
I put some numbers in A1:A7, "L" in C1 and "x" in D1
Then I used =IF(C1="L",IF(D1"",AVERAGE(IF(A1:A7=0,A1:A7)),"" ))
and it worked just fine

Normally to use two conditions in an IF we use the AND function:
=IF(AND(AR6="L",AW6<""), do_this, do_that)
Bet Boolean function (AND, OR . NOT) are not allowed in array functions
The alternative to AND is to multiply the two test, while the alternative
to OR is to add then
So this should work for you
{=IF((AR6="L")*(AW6"")),AVERAGE(IF(AT$6:AT$66=0, AT$6:AT$66)),"")}
if you want BOTH conditions to be true (AND)
or
{=IF((AR6="L")+(AW6"")),AVERAGE(IF(AT$6:AT$66=0, AT$6:AT$66)),"")}
if you want EITHER conditions to be true (OR)

When I look at your second formula, I wonder if you mean "do the average
if EITHER condition is true

best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"Mike" wrote in message
...
This is what i have & works well
{=IF(AR6="L",AVERAGE(IF(AT$6:AT$66=0,AT$6:AT$66)) ,"")}
Now what im trying to do is add AW6 IF name is entered
I tried these but not working
{=IF(AR6="L",IF(AW6"",AVERAGE(IF(AT$6:AT$66=0,AT $6:AT$66)),"")}
{=IF(AR6="L",OR(IF(AW6"",AVERAGE(IF(AT$6:AT$66=0 ,AT$6:AT$66)),"")}
I get a Name or False error( CAN SOMEONE PLEASE 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
Need to average data if in cells, but ignore blank cells. Paula Excel Worksheet Functions 4 July 1st 09 05:38 PM
zero value cells/blank cells causing error in AVERAGE? LilBeanie1033 Excel Worksheet Functions 5 March 19th 09 06:39 PM
from a group of cells.find average of cells containing values farm Excel Discussion (Misc queries) 1 December 21st 06 08:50 PM
Excel-only average cells if two cells in same row, meet two condit Eulie-Denver Excel Worksheet Functions 5 October 5th 06 11:15 PM
average cells, show 0 if nothing to average Kycajun Excel Discussion (Misc queries) 8 June 21st 06 07:36 PM


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