2003 hide #DIV/0! error with average forumla

seshultz

New Member
Joined
May 25, 2011
Messages
7
Hello,
I'm new to this forum and searched for similar topics but didn't find an answer I could apply, so sorry if this is redundant.

I am caculating percentages on several sets of columns and calculating the average of another set of columns. My percentage formula is simply: =p11/q11. I used the formula =IF(ISERROR(P11/Q11),"-",P11/Q11) to make the cell display a "-" rather than the #DIV/0! error until data is entered in the cells needed for calculation. When I tried to apply the same formula (in many different iterations), to my average calculation, I keep getting name recognition errors and other types of errors. Here is the average caculation I'm using: =AVERAGE(S8:U8).

Does anyone know how to combine an average calculation with a rule to display a "-" if a #DIV/0! error is created?

Thanks!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Welcome to the board...

Try

=IF(ISERROR(AVERAGE(S8:U8)),"-",AVERAGE(S8:U8))

Hope that helps.
 
Upvote 0
Hello,
I'm new to this forum and searched for similar topics but didn't find an answer I could apply, so sorry if this is redundant.

I am caculating percentages on several sets of columns and calculating the average of another set of columns. My percentage formula is simply: =p11/q11. I used the formula =IF(ISERROR(P11/Q11),"-",P11/Q11) to make the cell display a "-" rather than the #DIV/0! error until data is entered in the cells needed for calculation. When I tried to apply the same formula (in many different iterations), to my average calculation, I keep getting name recognition errors and other types of errors. Here is the average caculation I'm using: =AVERAGE(S8:U8).

Does anyone know how to combine an average calculation with a rule to display a "-" if a #DIV/0! error is created?

Thanks!

Couldn't you just use the IF ISERROR again?

=if(iserror(average(S8:U8)),"-",average(S8:U8))
 
Upvote 0
In order for the AVERAGE function to produce a value rather than a #DIV/0! error there needs to be at least one number in the range.....so you can use COUNT to check that, i.e.

=IF(COUNT(S8:U8),AVERAGE(S8:U8),"-")
 
Upvote 0

Forum statistics

Threads
1,224,516
Messages
6,179,231
Members
452,898
Latest member
Capolavoro009

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top