Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default How to average random cells with out counting zero?

I am trying to average every 8th cell in a column, however I do not want to
average zeros,
=AVERAGE((IF(A1=0,"",A1)),(IF(A8=0,"",A8)),(IF(A16 =0,"",A16)),(IF(A24=0,"",A24)))

is what I came up with but it gives the "#value" error! Please help
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default How to average random cells with out counting zero?


=(A1+A8+A16+A24)/((A1<0)+(A8<0)+(A16<0)+(A24<0))

--
Gary''s Student - gsnu200850


"Alex" wrote:

I am trying to average every 8th cell in a column, however I do not want to
average zeros,
=AVERAGE((IF(A1=0,"",A1)),(IF(A8=0,"",A8)),(IF(A16 =0,"",A16)),(IF(A24=0,"",A24)))

is what I came up with but it gives the "#value" error! Please help

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default How to average random cells with out counting zero?

Note that by concatenating something onto end, your cell contents are treated
as text, so to use them in further calculations will reuire you to strip off
the end, and then reconvert to number (VALUE function). But, to do what you
ask:

=TEXT(ROUND(D31/E31,2),"#.00")&" : 1"

The use of text forces the formatting of calculated value (similar to using
a custom format). The #.00 format forces a display of 2 digits past the
decimal, and then concatentating it to something else creates a text value
(which you can't use in math operations)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Alex" wrote:

I am trying to average every 8th cell in a column, however I do not want to
average zeros,
=AVERAGE((IF(A1=0,"",A1)),(IF(A8=0,"",A8)),(IF(A16 =0,"",A16)),(IF(A24=0,"",A24)))

is what I came up with but it gives the "#value" error! 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
Counting Months to get an Average LinLin Excel Worksheet Functions 3 January 6th 09 11:08 PM
counting random occurrences billy_bags Excel Discussion (Misc queries) 1 May 11th 07 12:04 AM
Average formula Counting zero's How do I get just the numers counted. [email protected] Excel Discussion (Misc queries) 1 March 2nd 07 02:56 PM
Average of a row of numbers not counting 0's BobS9895 Excel Worksheet Functions 3 July 19th 06 06:25 PM
How do I use an average function, not counting cells containing a Ryder Excel Worksheet Functions 2 March 16th 05 12:05 PM


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