#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Average if

I am trying to create an average of a range of cells - B2:F2000 - but only if
Column CJ is 1. I am also trying to inset this equation to a different
worksheet. The sheet with the data in it is called paste_data. Here is the
equation I am trying to use but it results in an error.

=AVERAGE(IF(paste_data!CJ2:CJ2000=1,paste_data!B2: F2000))
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Average if

There's nothing wrong with the formula. Did you enter it as an array? What
specific error do you get?

--
Biff
Microsoft Excel MVP


"mparker" wrote in message
...
I am trying to create an average of a range of cells - B2:F2000 - but only
if
Column CJ is 1. I am also trying to inset this equation to a different
worksheet. The sheet with the data in it is called paste_data. Here is
the
equation I am trying to use but it results in an error.

=AVERAGE(IF(paste_data!CJ2:CJ2000=1,paste_data!B2: F2000))



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,549
Default Average if

Biff,
I get 0 as a result when entered as an array formula.
However, this 'meat and potatoes' version seems to work...
=IF(AND(MAX(paste_data!CJ2:CJ2000) =1,MIN(paste_data!CJ2:CJ2000)=1,COUNTBLANK(paste_d ata!CJ2:CJ2000)=0),AVERAGE(B2:F2000),"Don't do
it")
--
Jim Cone
Portland, Oregon USA



"T. Valko"
wrote in message
There's nothing wrong with the formula. Did you enter it as an array? What
specific error do you get?
--
Biff
Microsoft Excel MVP



"mparker"

wrote in message
I am trying to create an average of a range of cells - B2:F2000 - but only
if
Column CJ is 1. I am also trying to inset this equation to a different
worksheet. The sheet with the data in it is called paste_data. Here is
the
equation I am trying to use but it results in an error.

=AVERAGE(IF(paste_data!CJ2:CJ2000=1,paste_data!B2: F2000))



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Average if

=AVERAGE(IF(Sheet1!CJ2:CJ2000=1,Sheet1!B2:F2000))

Array entered, worked just fine for me. Confirmation formulas also verified
the result was correct.

--
Biff
Microsoft Excel MVP


"Jim Cone" wrote in message
...
Biff,
I get 0 as a result when entered as an array formula.
However, this 'meat and potatoes' version seems to work...
=IF(AND(MAX(paste_data!CJ2:CJ2000)
=1,MIN(paste_data!CJ2:CJ2000)=1,COUNTBLANK(paste_d ata!CJ2:CJ2000)=0),AVERAGE(B2:F2000),"Don't
do
it")
--
Jim Cone
Portland, Oregon USA



"T. Valko"
wrote in message
There's nothing wrong with the formula. Did you enter it as an array? What
specific error do you get?
--
Biff
Microsoft Excel MVP



"mparker"

wrote in message
I am trying to create an average of a range of cells - B2:F2000 - but only
if
Column CJ is 1. I am also trying to inset this equation to a different
worksheet. The sheet with the data in it is called paste_data. Here is
the
equation I am trying to use but it results in an error.

=AVERAGE(IF(paste_data!CJ2:CJ2000=1,paste_data!B2: F2000))





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Average if

Thanks the array is what I was missing.

"T. Valko" wrote:

There's nothing wrong with the formula. Did you enter it as an array? What
specific error do you get?

--
Biff
Microsoft Excel MVP


"mparker" wrote in message
...
I am trying to create an average of a range of cells - B2:F2000 - but only
if
Column CJ is 1. I am also trying to inset this equation to a different
worksheet. The sheet with the data in it is called paste_data. Here is
the
equation I am trying to use but it results in an error.

=AVERAGE(IF(paste_data!CJ2:CJ2000=1,paste_data!B2: F2000))






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Average if

Just one more questions, this equation seems to be calculating blanks as 0s
in the average. Any idea?

"T. Valko" wrote:

There's nothing wrong with the formula. Did you enter it as an array? What
specific error do you get?

--
Biff
Microsoft Excel MVP


"mparker" wrote in message
...
I am trying to create an average of a range of cells - B2:F2000 - but only
if
Column CJ is 1. I am also trying to inset this equation to a different
worksheet. The sheet with the data in it is called paste_data. Here is
the
equation I am trying to use but it results in an error.

=AVERAGE(IF(paste_data!CJ2:CJ2000=1,paste_data!B2: F2000))




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Average if

=AVERAGE(IF((paste_data!CJ2:CJ2000=1)*(paste_data! B2:F2000<""),paste_data!B2:F2000))


"mparker" wrote:

Just one more questions, this equation seems to be calculating blanks as 0s
in the average. Any idea?

"T. Valko" wrote:

There's nothing wrong with the formula. Did you enter it as an array? What
specific error do you get?

--
Biff
Microsoft Excel MVP


"mparker" wrote in message
...
I am trying to create an average of a range of cells - B2:F2000 - but only
if
Column CJ is 1. I am also trying to inset this equation to a different
worksheet. The sheet with the data in it is called paste_data. Here is
the
equation I am trying to use but it results in an error.

=AVERAGE(IF(paste_data!CJ2:CJ2000=1,paste_data!B2: F2000))




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,549
Default Average if

Biff,
It appears that the elephant I saw was not the elephant you saw...
I saw the issue as: only average the data in B2:F2000 if every
cell in CJ2:CJ2000 has a 1 in it.
--
Jim Cone
Portland, Oregon USA



"T. Valko"
wrote in message
=AVERAGE(IF(Sheet1!CJ2:CJ2000=1,Sheet1!B2:F2000))
Array entered, worked just fine for me. Confirmation formulas also verified
the result was correct.
--
Biff
Microsoft Excel MVP


"Jim Cone" wrote in message
...
Biff,
I get 0 as a result when entered as an array formula.
However, this 'meat and potatoes' version seems to work...
=IF(AND(MAX(paste_data!CJ2:CJ2000)
=1,MIN(paste_data!CJ2:CJ2000)=1,COUNTBLANK(paste_d ata!CJ2:CJ2000)=0),AVERAGE(B2:F2000),"Don't
do
it")
--
Jim Cone
Portland, Oregon USA


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Average if

Anyway to change the B2 to C2 instead of changing it to B3?

"Idoia" wrote:

=AVERAGE(IF((paste_data!CJ2:CJ2000=1)*(paste_data! B2:F2000<""),paste_data!B2:F2000))


"mparker" wrote:

Just one more questions, this equation seems to be calculating blanks as 0s
in the average. Any idea?

"T. Valko" wrote:

There's nothing wrong with the formula. Did you enter it as an array? What
specific error do you get?

--
Biff
Microsoft Excel MVP


"mparker" wrote in message
...
I am trying to create an average of a range of cells - B2:F2000 - but only
if
Column CJ is 1. I am also trying to inset this equation to a different
worksheet. The sheet with the data in it is called paste_data. Here is
the
equation I am trying to use but it results in an error.

=AVERAGE(IF(paste_data!CJ2:CJ2000=1,paste_data!B2: F2000))



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
A formula to AVERAGE IF but only average a set number of values [email protected] Excel Worksheet Functions 2 January 31st 08 08:28 PM
Find monthly average but have average automatically configured kimbafred Excel Discussion (Misc queries) 2 August 8th 07 12:28 AM
Error Handling #N/A with AVERAGE Function - Average of values in Row Sam via OfficeKB.com Excel Worksheet Functions 13 July 31st 05 03:59 PM
Weighed Average of a weiged average when there are blanks krl - ExcelForums.com Excel Discussion (Misc queries) 1 July 6th 05 07:37 PM
how does one convert text to a formula "average(A:A)" to =average( phshirk Excel Worksheet Functions 4 April 14th 05 01:20 AM


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