#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 87
Default aveage or a blank

I'm trying to average 4 columns on one worksheet c1:f1 but sometimes all
four cells have have a 0 %. This gives me a div/error which crosses over
to my summary worksheet . I would like E1 to be an average of these four
cells or a blank.

Can anyone help me?

Thank you
Deb

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 87
Default aveage or a blank

OOPs.. I meant to say all four cells could on occasion be blank which gives
me a div/error . I would like answer in this case to also be a blank.

"ferde" wrote:

I'm trying to average 4 columns on one worksheet c1:f1 but sometimes all
four cells have have a 0 %. This gives me a div/error which crosses over
to my summary worksheet . I would like E1 to be an average of these four
cells or a blank.

Can anyone help me?

Thank you
Deb

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default aveage or a blank

The only way that you should get that Div/0 error is if you don't have any
numbers in those cells. You can have as many 0% as you want--it won't cause
this error.

You can use a formula like this make sure you don't get that error:
=if(count(c1:f1)=0,"",average(c1:f1))

As an aside, averaging percentages may not give you the result you want.

For instance, if a baseball player goes 1 for 2 in the month of April (50%) and
then 1 for 100 in the month of May (1%), his average wouldn't be (50% + 1%)/2
(or 25.5%).

It would be 2 for 102 or about 2%.





ferde wrote:

I'm trying to average 4 columns on one worksheet c1:f1 but sometimes all
four cells have have a 0 %. This gives me a div/error which crosses over
to my summary worksheet . I would like E1 to be an average of these four
cells or a blank.

Can anyone help me?

Thank you
Deb


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 87
Default aveage or a blank

Hi Dave

Actually I meant to say I am getting this Div/o error because my cells
occasionally are blank so I tried to use your formula and substitued ""
instead of 0 but now I get a value error. Not sure what I'm doing wrong.

=if(count(c1:f1)="","",average(c1:f1))


Thank you for your help


"Dave Peterson" wrote:

The only way that you should get that Div/0 error is if you don't have any
numbers in those cells. You can have as many 0% as you want--it won't cause
this error.

You can use a formula like this make sure you don't get that error:
=if(count(c1:f1)=0,"",average(c1:f1))

As an aside, averaging percentages may not give you the result you want.

For instance, if a baseball player goes 1 for 2 in the month of April (50%) and
then 1 for 100 in the month of May (1%), his average wouldn't be (50% + 1%)/2
(or 25.5%).

It would be 2 for 102 or about 2%.





ferde wrote:

I'm trying to average 4 columns on one worksheet c1:f1 but sometimes all
four cells have have a 0 %. This gives me a div/error which crosses over
to my summary worksheet . I would like E1 to be an average of these four
cells or a blank.

Can anyone help me?

Thank you
Deb


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default aveage or a blank

You changed the suggested formula. =Count() is going to return a number.

Try:
=if(count(c1:f1)=0,"",average(c1:f1))





ferde wrote:

Hi Dave

Actually I meant to say I am getting this Div/o error because my cells
occasionally are blank so I tried to use your formula and substitued ""
instead of 0 but now I get a value error. Not sure what I'm doing wrong.

=if(count(c1:f1)="","",average(c1:f1))

Thank you for your help

"Dave Peterson" wrote:

The only way that you should get that Div/0 error is if you don't have any
numbers in those cells. You can have as many 0% as you want--it won't cause
this error.

You can use a formula like this make sure you don't get that error:
=if(count(c1:f1)=0,"",average(c1:f1))

As an aside, averaging percentages may not give you the result you want.

For instance, if a baseball player goes 1 for 2 in the month of April (50%) and
then 1 for 100 in the month of May (1%), his average wouldn't be (50% + 1%)/2
(or 25.5%).

It would be 2 for 102 or about 2%.





ferde wrote:

I'm trying to average 4 columns on one worksheet c1:f1 but sometimes all
four cells have have a 0 %. This gives me a div/error which crosses over
to my summary worksheet . I would like E1 to be an average of these four
cells or a blank.

Can anyone help me?

Thank you
Deb


--

Dave Peterson


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 87
Default aveage or a blank

Thank you Dave.....now it works PERFECTLY

Best regards
Deb






"Dave Peterson" wrote:

You changed the suggested formula. =Count() is going to return a number.

Try:
=if(count(c1:f1)=0,"",average(c1:f1))





ferde wrote:

Hi Dave

Actually I meant to say I am getting this Div/o error because my cells
occasionally are blank so I tried to use your formula and substitued ""
instead of 0 but now I get a value error. Not sure what I'm doing wrong.

=if(count(c1:f1)="","",average(c1:f1))

Thank you for your help

"Dave Peterson" wrote:

The only way that you should get that Div/0 error is if you don't have any
numbers in those cells. You can have as many 0% as you want--it won't cause
this error.

You can use a formula like this make sure you don't get that error:
=if(count(c1:f1)=0,"",average(c1:f1))

As an aside, averaging percentages may not give you the result you want.

For instance, if a baseball player goes 1 for 2 in the month of April (50%) and
then 1 for 100 in the month of May (1%), his average wouldn't be (50% + 1%)/2
(or 25.5%).

It would be 2 for 102 or about 2%.





ferde wrote:

I'm trying to average 4 columns on one worksheet c1:f1 but sometimes all
four cells have have a 0 %. This gives me a div/error which crosses over
to my summary worksheet . I would like E1 to be an average of these four
cells or a blank.

Can anyone help me?

Thank you
Deb

--

Dave Peterson


--

Dave Peterson

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
conditional formatting:highlight row based on blank or non-blank c Nat Maxwell Excel Worksheet Functions 3 May 14th 23 07:43 PM
where can I down Blank Worksheets, blank stmt. of account forms carmen Excel Discussion (Misc queries) 2 January 15th 07 03:03 PM
Not showing blank and non blank items in filter mode for values Bhaskar Polisetty Excel Worksheet Functions 0 June 20th 06 02:04 PM
how to get excel to display blank if reference cell blank silent1(not) Excel Worksheet Functions 1 December 2nd 05 02:49 PM
How do I make a blank cell with a date format blank? Pivot Table/Query Excel Worksheet Functions 6 June 14th 05 11:19 PM


All times are GMT +1. The time now is 02:32 PM.

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"