View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default excluding #DIV/0! in further calculations

tom ossieur wrote...
I am doing some calculations in several steps. In some steps the
result of some cells is #DIV/0!

as a result the final result (STDEV) gives #REF!


The only way you get #REF! is if the #DIV/0! error screws up a
function that returns a range reference, e.g., INDEX, OFFSET or
INDIRECT. Why not tell us which?

how to exclude the cells that contain #DIV/0! so I get the result
in the last step, based on the cells that had a intermediate
result? (without adapting ALL intermdiate steps with IF etc)


If the #DIV/0! is screwing up intermediate function calls that should
be returning range references, there's no way to respond with anything
useful without knowing more details. If I'm right about the nature of
the intermediate functions, your choices are limited to returning
nothing when there are errors, so the final formula would look like

=IF(ISNUMBER(STDEV(whatever)),STDEV(whatever),"")

or trapping the #DIV/0! errors in the intermediate function calls.
Maybe there's a better way to handle this, but you'd need to provide
more details.