#1   Report Post  
Renee - California
 
Posts: n/a
Default countif

I have a summarizing section of a worksheet in which I need to get an average
for a range of
cells:(N13+X13+AH13+AR13+BB13+BL13+BV13+CF13+CP13+ CZ13+DJ13+DT13+ED13+EN13+EX13+FH13+FR13+GB13+GL13+ GV13+HF13+HP13+HZ13+IJ13)

I need to put a condition on it that the average is based on only the cells
with a value though. So I was thinking that I'd add on a countif condition
to get the number it divides by.

(N13+X13+AH13+AR13+BB13+BL13+BV13+CF13+CP13+CZ13+D J13+DT13+ED13+EN13+EX13+FH13+FR13+GB13+GL13+GV13+H F13+HP13+HZ13+IJ13)/COUNTIF(N13,"0")

This only says if N13 is greater than zero, but I have all the other cells
that need be spedified as greater than zero as well. How do I do this
function??
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way (array-entered: CTRL-SHIFT-ENTER or CMD-RETURN):

=AVERAGE(IF((MOD(COLUMN(N13:IJ13),10)=4)*(N13:IJ13 0),N13:IJ13))

will only average values 0.

If you may have zero or negative values that should be averaged in, try
(also array-entered):

=AVERAGE(IF((MOD(COLUMN(N13:IJ13),10)=4)*(N13:IJ13 <""),N13:IJ13))



In article ,
Renee - California wrote:

I have a summarizing section of a worksheet in which I need to get an average
for a range of
cells:(N13+X13+AH13+AR13+BB13+BL13+BV13+CF13+CP13+ CZ13+DJ13+DT13+ED13+EN13+EX1
3+FH13+FR13+GB13+GL13+GV13+HF13+HP13+HZ13+IJ13)

I need to put a condition on it that the average is based on only the cells
with a value though. So I was thinking that I'd add on a countif condition
to get the number it divides by.

(N13+X13+AH13+AR13+BB13+BL13+BV13+CF13+CP13+CZ13+D J13+DT13+ED13+EN13+EX13+FH13
+FR13+GB13+GL13+GV13+HF13+HP13+HZ13+IJ13)/COUNTIF(N13,"0")

This only says if N13 is greater than zero, but I have all the other cells
that need be spedified as greater than zero as well. How do I do this
function??

  #3   Report Post  
Renee - California
 
Posts: n/a
Default

Thanks for the feedback and help.

I've plugged this in and I'm getting #Value! return. Any ideas on why?
Also, what does the =4 signify is this formula?

Thanks again for your help.

"JE McGimpsey" wrote:

One way (array-entered: CTRL-SHIFT-ENTER or CMD-RETURN):

=AVERAGE(IF((MOD(COLUMN(N13:IJ13),10)=4)*(N13:IJ13 0),N13:IJ13))

will only average values 0.

If you may have zero or negative values that should be averaged in, try
(also array-entered):

=AVERAGE(IF((MOD(COLUMN(N13:IJ13),10)=4)*(N13:IJ13 <""),N13:IJ13))



In article ,
Renee - California wrote:

I have a summarizing section of a worksheet in which I need to get an average
for a range of
cells:(N13+X13+AH13+AR13+BB13+BL13+BV13+CF13+CP13+ CZ13+DJ13+DT13+ED13+EN13+EX1
3+FH13+FR13+GB13+GL13+GV13+HF13+HP13+HZ13+IJ13)

I need to put a condition on it that the average is based on only the cells
with a value though. So I was thinking that I'd add on a countif condition
to get the number it divides by.

(N13+X13+AH13+AR13+BB13+BL13+BV13+CF13+CP13+CZ13+D J13+DT13+ED13+EN13+EX13+FH13
+FR13+GB13+GL13+GV13+HF13+HP13+HZ13+IJ13)/COUNTIF(N13,"0")

This only says if N13 is greater than zero, but I have all the other cells
that need be spedified as greater than zero as well. How do I do this
function??


  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

It's probably because you didn't hold down CTRL and SHIFT when you hit
ENTER.

Since your first column is the 14th ("N"), MOD(COLUMN(N),10) = 4.
Subsequent columns also have this property since you're averaging every
10th column,.



In article ,
Renee - California wrote:

I've plugged this in and I'm getting #Value! return. Any ideas on why?
Also, what does the =4 signify is this formula?

Thanks again for your help.

"JE McGimpsey" wrote:

One way (array-entered: CTRL-SHIFT-ENTER or CMD-RETURN):

=AVERAGE(IF((MOD(COLUMN(N13:IJ13),10)=4)*(N13:IJ13 0),N13:IJ13))

  #5   Report Post  
Renee - California
 
Posts: n/a
Default

Thanks for the clarification. Yes, I originally entered instead of
Control/Shift and enter.

Now I'm getting #Div/0, and what's weird about that is, I put in a value at
every cell to test.

I'm baffled. Any other insight you could give would be much appreciated.

Thanks!

"JE McGimpsey" wrote:

It's probably because you didn't hold down CTRL and SHIFT when you hit
ENTER.

Since your first column is the 14th ("N"), MOD(COLUMN(N),10) = 4.
Subsequent columns also have this property since you're averaging every
10th column,.



In article ,
Renee - California wrote:

I've plugged this in and I'm getting #Value! return. Any ideas on why?
Also, what does the =4 signify is this formula?

Thanks again for your help.

"JE McGimpsey" wrote:

One way (array-entered: CTRL-SHIFT-ENTER or CMD-RETURN):

=AVERAGE(IF((MOD(COLUMN(N13:IJ13),10)=4)*(N13:IJ13 0),N13:IJ13))


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
COUNTIF COMBINATION?? Heather Excel Worksheet Functions 1 April 26th 05 02:44 AM
Combining IF and COUNTIF based on two columns maxtrixx Excel Discussion (Misc queries) 5 March 31st 05 06:21 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 15th 04 11:06 PM
countif, again Liz G Excel Worksheet Functions 2 November 1st 04 11:20 PM


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