Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Teri
 
Posts: n/a
Default ARRAY FORMULA-RETURN 0 INSTEAD OF #DIV/0

Here is my array formula. I would like it to return a ZERO instead of
#DIV/0. Have spent way too much time trying to make it work and thought some
kind soul out there would be willing to help me:

{=AVERAGE(IF(H3:H6<0, H3:H6,""))}

Thanks in advance!

  #2   Report Post  
RagDyeR
 
Posts: n/a
Default

Try This:

=IF((ISERR(AVERAGE(H3:H6))),"",AVERAGE(H3:H6))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Teri" wrote in message
...
Here is my array formula. I would like it to return a ZERO instead of
#DIV/0. Have spent way too much time trying to make it work and thought
some
kind soul out there would be willing to help me:

{=AVERAGE(IF(H3:H6<0, H3:H6,""))}

Thanks in advance!


  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

I am assuming you get these errors because the range is empty, you can use

=IF(COUNTBLANK(H3:H6)=ROWS(H3:H6),0,AVERAGE(IF(H3: H6<0,H3:H6)))

entered with ctrl + shift & enter


Regards,

Peo Sjoblom

"Teri" wrote:

Here is my array formula. I would like it to return a ZERO instead of
#DIV/0. Have spent way too much time trying to make it work and thought some
kind soul out there would be willing to help me:

{=AVERAGE(IF(H3:H6<0, H3:H6,""))}

Thanks in advance!

  #4   Report Post  
Teri
 
Posts: n/a
Default

Thanks so much for your response, however your formula doesn't address the
zeroes that are in the array. Consequently, since the value are currently
31, 0, 0, 0 I get an answer of 7.5 instead of 31.

"RagDyeR" wrote:

Try This:

=IF((ISERR(AVERAGE(H3:H6))),"",AVERAGE(H3:H6))
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Teri" wrote in message
...
Here is my array formula. I would like it to return a ZERO instead of
#DIV/0. Have spent way too much time trying to make it work and thought
some
kind soul out there would be willing to help me:

{=AVERAGE(IF(H3:H6<0, H3:H6,""))}

Thanks in advance!



  #5   Report Post  
Teri
 
Posts: n/a
Default

Actually, no. The range isn't empty. Currently it has the value of 31, 0,
0, and 0. Sorry I didn't mention that before.

"Peo Sjoblom" wrote:

I am assuming you get these errors because the range is empty, you can use

=IF(COUNTBLANK(H3:H6)=ROWS(H3:H6),0,AVERAGE(IF(H3: H6<0,H3:H6)))

entered with ctrl + shift & enter


Regards,

Peo Sjoblom

"Teri" wrote:

Here is my array formula. I would like it to return a ZERO instead of
#DIV/0. Have spent way too much time trying to make it work and thought some
kind soul out there would be willing to help me:

{=AVERAGE(IF(H3:H6<0, H3:H6,""))}

Thanks in advance!



  #6   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

It doesn't matter, my formula will disregard the zeros and as an extra
precaution it will not return an error if all cells are empty

Regards,

Peo Sjoblom

"Teri" wrote:

Actually, no. The range isn't empty. Currently it has the value of 31, 0,
0, and 0. Sorry I didn't mention that before.

"Peo Sjoblom" wrote:

I am assuming you get these errors because the range is empty, you can use

=IF(COUNTBLANK(H3:H6)=ROWS(H3:H6),0,AVERAGE(IF(H3: H6<0,H3:H6)))

entered with ctrl + shift & enter


Regards,

Peo Sjoblom

"Teri" wrote:

Here is my array formula. I would like it to return a ZERO instead of
#DIV/0. Have spent way too much time trying to make it work and thought some
kind soul out there would be willing to help me:

{=AVERAGE(IF(H3:H6<0, H3:H6,""))}

Thanks in advance!

  #7   Report Post  
Teri
 
Posts: n/a
Default

I entered the formula per your instructions. It worked fine, however, if I
replaced the 31 with a zero, I got the #DIV/0 error again.

"Peo Sjoblom" wrote:

It doesn't matter, my formula will disregard the zeros and as an extra
precaution it will not return an error if all cells are empty

Regards,

Peo Sjoblom

"Teri" wrote:

Actually, no. The range isn't empty. Currently it has the value of 31, 0,
0, and 0. Sorry I didn't mention that before.

"Peo Sjoblom" wrote:

I am assuming you get these errors because the range is empty, you can use

=IF(COUNTBLANK(H3:H6)=ROWS(H3:H6),0,AVERAGE(IF(H3: H6<0,H3:H6)))

entered with ctrl + shift & enter


Regards,

Peo Sjoblom

"Teri" wrote:

Here is my array formula. I would like it to return a ZERO instead of
#DIV/0. Have spent way too much time trying to make it work and thought some
kind soul out there would be willing to help me:

{=AVERAGE(IF(H3:H6<0, H3:H6,""))}

Thanks in advance!

  #8   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

OK, got you

=IF(COUNTIF(H3:H6,0)=COUNT(H3:H6),0,AVERAGE(IF(H3: H6<0,H3:H6)))

entered with ctrl + shift & enter will work if all cells empty and all if
cells are 0 and will disregard zeros in the average


Regards,

Peo Sjoblom

"Teri" wrote:

I entered the formula per your instructions. It worked fine, however, if I
replaced the 31 with a zero, I got the #DIV/0 error again.

"Peo Sjoblom" wrote:

It doesn't matter, my formula will disregard the zeros and as an extra
precaution it will not return an error if all cells are empty

Regards,

Peo Sjoblom

"Teri" wrote:

Actually, no. The range isn't empty. Currently it has the value of 31, 0,
0, and 0. Sorry I didn't mention that before.

"Peo Sjoblom" wrote:

I am assuming you get these errors because the range is empty, you can use

=IF(COUNTBLANK(H3:H6)=ROWS(H3:H6),0,AVERAGE(IF(H3: H6<0,H3:H6)))

entered with ctrl + shift & enter


Regards,

Peo Sjoblom

"Teri" wrote:

Here is my array formula. I would like it to return a ZERO instead of
#DIV/0. Have spent way too much time trying to make it work and thought some
kind soul out there would be willing to help me:

{=AVERAGE(IF(H3:H6<0, H3:H6,""))}

Thanks in advance!

  #9   Report Post  
Teri
 
Posts: n/a
Default

PERFECT! Thank you SO MUCH!

"Peo Sjoblom" wrote:

OK, got you

=IF(COUNTIF(H3:H6,0)=COUNT(H3:H6),0,AVERAGE(IF(H3: H6<0,H3:H6)))

entered with ctrl + shift & enter will work if all cells empty and all if
cells are 0 and will disregard zeros in the average


Regards,

Peo Sjoblom

"Teri" wrote:

I entered the formula per your instructions. It worked fine, however, if I
replaced the 31 with a zero, I got the #DIV/0 error again.

"Peo Sjoblom" wrote:

It doesn't matter, my formula will disregard the zeros and as an extra
precaution it will not return an error if all cells are empty

Regards,

Peo Sjoblom

"Teri" wrote:

Actually, no. The range isn't empty. Currently it has the value of 31, 0,
0, and 0. Sorry I didn't mention that before.

"Peo Sjoblom" wrote:

I am assuming you get these errors because the range is empty, you can use

=IF(COUNTBLANK(H3:H6)=ROWS(H3:H6),0,AVERAGE(IF(H3: H6<0,H3:H6)))

entered with ctrl + shift & enter


Regards,

Peo Sjoblom

"Teri" wrote:

Here is my array formula. I would like it to return a ZERO instead of
#DIV/0. Have spent way too much time trying to make it work and thought some
kind soul out there would be willing to help me:

{=AVERAGE(IF(H3:H6<0, H3:H6,""))}

Thanks in advance!

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
Formula to return tomorrow's date. Shadyhosta New Users to Excel 6 April 4th 23 10:20 AM
Array Formula Doug at HAL Excel Worksheet Functions 3 December 21st 04 10:27 AM
Need help troubleshooting an array formula XLXP on Win2K KR Excel Worksheet Functions 1 December 13th 04 07:41 PM
What instead of an array formula part 2 Reg Besseling Excel Discussion (Misc queries) 2 December 10th 04 07:35 AM
What instead of an array formula? Reg Besseling Excel Discussion (Misc queries) 3 December 6th 04 01:55 PM


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