Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 788
Default Divide by zero error

I have a sheet that I am tracking values from other sheets on. I want to
average those numbers but I get a divide by zero error. How do I ignore the
cell when it has this. I have tried
=AVERAGE(IF((MOD(ROW(C6:C23)-ROW(C6),2)=0)*(C6:C23<0),C6:C23)) and using
ctrl + shift + enter.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Location: Bakersfield, CA
Posts: 45
Send a message via Skype™ to JBeaucaire[_85_]
Default Divide by zero error

Depends on how you want to handle it. The simplest way is to fill in the
missing "value if false" portion of the formula with a 1 or a 0, like so:

=AVERAGE(IF((MOD(ROW(C6:C23)-ROW(C6),2)=0)*(C6:C23<0),C6:C23,0))

If you have Excel 2007, you could leave that off, if you don't want to
display a zero or 1, and wrap the whole formula in an IFERROR:

=IFERROR(AVERAGE(IF((MOD(ROW(C6:C23)-ROW(C6),2)=0)*(C6:C23<0),C6:C23)),"")

If you're on Excel 2003 or earlier, let me know and I'll show you had to add
that function into your sheet.

Will that work for you?


--
"Actually, I AM a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Chris" wrote:

I have a sheet that I am tracking values from other sheets on. I want to
average those numbers but I get a divide by zero error. How do I ignore the
cell when it has this. I have tried
=AVERAGE(IF((MOD(ROW(C6:C23)-ROW(C6),2)=0)*(C6:C23<0),C6:C23)) and using
ctrl + shift + enter.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 896
Default Divide by zero error

you're lacking one comma in the formula end

=AVERAGE(IF((MOD(ROW(C6:C23)-ROW(C6),2)=0)*(C6:C23<0),C6:C23,))

this should do it in my opinion

On 13 Sty, 13:46, Chris wrote:
I have a sheet that I am tracking values from other sheets on. I want to
average those numbers but I get a divide by zero error. How do I ignore the
cell when it has this. I have tried
=AVERAGE(IF((MOD(ROW(C6:C23)-ROW(C6),2)=0)*(C6:C23<0),C6:C23)) and using
ctrl + shift + enter.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 788
Default Divide by zero error

For some reason it is not working.
C6:C26 are = to different cells on different sheets. I want to average that
column. Sometimes the C6:C26 may have the #DIV/0! in 1 or more of those cells.

"JBeaucaire" wrote:

Depends on how you want to handle it. The simplest way is to fill in the
missing "value if false" portion of the formula with a 1 or a 0, like so:

=AVERAGE(IF((MOD(ROW(C6:C23)-ROW(C6),2)=0)*(C6:C23<0),C6:C23,0))

If you have Excel 2007, you could leave that off, if you don't want to
display a zero or 1, and wrap the whole formula in an IFERROR:

=IFERROR(AVERAGE(IF((MOD(ROW(C6:C23)-ROW(C6),2)=0)*(C6:C23<0),C6:C23)),"")

If you're on Excel 2003 or earlier, let me know and I'll show you had to add
that function into your sheet.

Will that work for you?


--
"Actually, I AM a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"Chris" wrote:

I have a sheet that I am tracking values from other sheets on. I want to
average those numbers but I get a divide by zero error. How do I ignore the
cell when it has this. I have tried
=AVERAGE(IF((MOD(ROW(C6:C23)-ROW(C6),2)=0)*(C6:C23<0),C6:C23)) and using
ctrl + shift + enter.

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
Divide by Zero Error hkslater Excel Worksheet Functions 7 June 12th 08 02:59 AM
divide by 0 error jmp JohnnyJomp New Users to Excel 2 February 29th 08 05:32 PM
Divide by zero error jimmy Excel Discussion (Misc queries) 1 June 13th 07 02:36 AM
Divide by zero error gregmosu Excel Discussion (Misc queries) 1 June 30th 06 05:00 PM
Sum and Divide Formula error JaB Excel Worksheet Functions 7 April 19th 06 07:47 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"