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

I have a spreadsheet where, cell U6 is an average of Z6-AE6. i also need U6
to =0 if any cell within Z6 - AE6 is a 0. Can anyone help please
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 213
Default formula

I have a spreadsheet where, cell U6 is an average of Z6-AE6. i also
need U6 to =0 if any cell within Z6 - AE6 is a 0. ...


One way:
=IF(PRODUCT(Z6:AE6)=0,0,AVERAGE(Z6:AE6))

Caution: an empty cell doesn't count as zero with this formula. Neither
does text.
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default formula

Thank you that is brilliant.

"MyVeryOwnSelf" wrote:

I have a spreadsheet where, cell U6 is an average of Z6-AE6. i also
need U6 to =0 if any cell within Z6 - AE6 is a 0. ...


One way:
=IF(PRODUCT(Z6:AE6)=0,0,AVERAGE(Z6:AE6))

Caution: an empty cell doesn't count as zero with this formula. Neither
does text.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default formula

Try =IF(COUNTIF(Z6:AE6,"0")0,0,AVERAGE(Z6:AE6))

"IF the number of 0s in the range Z6:AE6 is greater than 0, THEN 0, ELSE
take the average of the range Z6:AE6."

Dave
--
Brevity is the soul of wit.


"kano71" wrote:

I have a spreadsheet where, cell U6 is an average of Z6-AE6. i also need U6
to =0 if any cell within Z6 - AE6 is a 0. Can anyone help please

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default formula

MyVeryOwnSelf

One way:
=IF(PRODUCT(Z6:AE6)=0,0,AVERAGE(Z6:AE6))


Won't that return zero if there is a zero anywhere in Z6:AE6?

Perhaps:

=IF(SUM(Z6:AE6)=0,0,AVERAGE(Z6:AE6))

or

=IF(SUM(Z6:AE6),AVERAGE(Z6:AE6),0)

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"MyVeryOwnSelf" wrote in message
...
I have a spreadsheet where, cell U6 is an average of Z6-AE6. i also
need U6 to =0 if any cell within Z6 - AE6 is a 0. ...


One way:
=IF(PRODUCT(Z6:AE6)=0,0,AVERAGE(Z6:AE6))

Caution: an empty cell doesn't count as zero with this formula. Neither
does text.






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default formula

Yes it would return 0 if a 0 is in that range.

But that's what the original poster asked for.

Dave
--
Brevity is the soul of wit.


"Sandy Mann" wrote:

MyVeryOwnSelf

One way:
=IF(PRODUCT(Z6:AE6)=0,0,AVERAGE(Z6:AE6))


Won't that return zero if there is a zero anywhere in Z6:AE6?

Perhaps:

=IF(SUM(Z6:AE6)=0,0,AVERAGE(Z6:AE6))

or

=IF(SUM(Z6:AE6),AVERAGE(Z6:AE6),0)

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"MyVeryOwnSelf" wrote in message
...
I have a spreadsheet where, cell U6 is an average of Z6-AE6. i also
need U6 to =0 if any cell within Z6 - AE6 is a 0. ...


One way:
=IF(PRODUCT(Z6:AE6)=0,0,AVERAGE(Z6:AE6))

Caution: an empty cell doesn't count as zero with this formula. Neither
does text.





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
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
2 Nesting questions Starchaser Excel Worksheet Functions 7 January 20th 06 06:53 PM
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM


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