Need assistance with a formula.

pujo

Well-known Member
Joined
Feb 19, 2009
Messages
710
Office Version
  1. 2019
  2. 2013
Platform
  1. Windows
Trying to use this formula however I am getting an "error with formula". =IFERROR(AVERAGEIF(K25:O25,”>0”),”0”)
Maybe someone can lend me a hand with this?

Thanks,
PuJo
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Try this

=IFERROR(IF(AVERAGE(K25:O25)>0,AVERAGE(K25:O25),0),0)

IF (Logical Condition: If Average is greater than 0, Value if Condition is Met then calculate average of specified range, value if condition not met give me 0

IF ERROR will automatically result in 0 if there is some error elsewhere
 
Last edited:
Upvote 0
You'll need to use double quotes instead of the left and right double quotation marks...

=IFERROR(AVERAGEIF(K25:O25,">0"),"0")
 
Last edited:
Upvote 0
Hey Seba, thanks for the reply however it doesn't seem to be ignoring the zero values in the data I am trying to average.
 
Upvote 0
You're very welcome. By the way, while IFERROR returns 0 when AVERAGEIF returns an error, the 0 is formatted as text instead of a numerical value. To return a numerical value, simply remove the double quotes...

=IFERROR(AVERAGEIF(K25:O25,">0"),0)
 
Upvote 0
Having the same problem again, this time I am averaging a named range. =AVERAGEIF(SS_FOURTH_Q,">0")
Tried =IFERROR(AVERAGEIF(SS_FOURTH_Q,">0"),0) as well as =IFERROR(AVERAGEIF(SS_FOURTH_Q,">0"),"0")
still getting the error.....

For some reason, my Mac keeps using the wrong quotes...

Thanks!

 
Last edited:
Upvote 0
I don't have a Mac, but on my keyboard the double quotes is located together with the apostrophe key. So I would press the key combination Shift + ' . If this is the only key available for double quotes, the problem might be with the system settings. In this case, check System Preferences >> Keyboard >> Text, something like that.
 
Last edited:
Upvote 0
Yea, same on a Mac however my problem is that I was typing them in notepad very large font (my eyes are bad) then copying them to excel.
Probably an issue copying from notepad to excel. Thanks for the assistance, you really helped my out here!
 
Upvote 0

Forum statistics

Threads
1,223,892
Messages
6,175,236
Members
452,621
Latest member
Laura_PinksBTHFT

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