#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default calc in excel

I am calculating the average of numerical values from the same cell of many
worksheets. some cells don't have available value. the calc returns error
because it substitutes the empty cell with the value 0. How do you write a
formulae that ignore the empty cell and does not include it in the calc?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default calc in excel

Hi,

Excel will ignore blank cells in an average formula even across multiple
sheets, try this

=AVERAGE(Sheet1:Sheet3!A1)

Mike

"excel calc" wrote:

I am calculating the average of numerical values from the same cell of many
worksheets. some cells don't have available value. the calc returns error
because it substitutes the empty cell with the value 0. How do you write a
formulae that ignore the empty cell and does not include it in the calc?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default calc in excel

It depends entirely on the calculation. One way is to test each input
cell for 0 length (an empty cell) and only if all cells are filled in
would you do the actual calculation. E.g.,

=IF(AND(LEN(A1)0,LEN(A2)0,LEN(A3)0),YourCalcula tion,NA())

Here, the YourCalculation is your original formula. If cells A1, A2,
and A3 all have data, then YourCalculation is evaluated. If any one or
more of these cells is empty, the formula returns an #N/A error.

The AVERAGE function ignores empty cells (it does not treat them as
zero), but you can use an array formula to force this. E.g,

=AVERAGE(IF(LEN(A1:A5)0,A1:A5,FALSE))

This is an array formula, so 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
enclosed in curly braces { }. See
http://www.cpearson.com/Excel/arrayformulas.aspx for much more info
about array formulas.


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


On Wed, 22 Oct 2008 14:43:01 -0700, excel calc <excel
wrote:

I am calculating the average of numerical values from the same cell of many
worksheets. some cells don't have available value. the calc returns error
because it substitutes the empty cell with the value 0. How do you write a
formulae that ignore the empty cell and does not include it in the calc?

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
Calc = Manual & Do Not Calc b/4 SAVE Ken Excel Discussion (Misc queries) 0 October 3rd 07 02:28 PM
save Excel calc' as the number Rich01260 Excel Discussion (Misc queries) 2 February 14th 07 10:44 AM
My calc key on Excel changes box to "Text" Box and doesn't calc ? jack Charts and Charting in Excel 0 August 8th 06 07:30 PM
auto calc on, but have to edit (f2) cells to force re-calc..help! Curt Excel Worksheet Functions 3 February 13th 06 06:05 PM
Excel Won't Calc? Eric Excel Worksheet Functions 7 October 26th 05 02:19 PM


All times are GMT +1. The time now is 12:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"